From f177a8e65d22c90ca7258067c017690c5200d8fd Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Sat, 11 Jul 2026 23:54:48 -0400 Subject: [PATCH] tty: make ops struct not a pointer Signed-off-by: Michael Shaw --- drivers/tty/tty.c | 6 +++--- include/drivers/tty.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/tty.c b/drivers/tty/tty.c index 0f8fd2c..1c3d21e 100644 --- a/drivers/tty/tty.c +++ b/drivers/tty/tty.c @@ -17,19 +17,19 @@ struct tty *tty_create(const char *name, void *priv) tty->dev = tty_device; tty->priv = priv; - tty->serial_ops = &arch_serial_ops; + tty->serial_ops = arch_serial_ops; return tty; } void tty_putchar(struct tty *tty, char c) { - tty->serial_ops->serial_putchar(tty, c); + tty->serial_ops.serial_putchar(tty, c); } char tty_getchar(struct tty *tty) { - return tty->serial_ops->serial_getchar(tty); + return tty->serial_ops.serial_getchar(tty); } void tty_write(struct tty *tty, const char *s) diff --git a/include/drivers/tty.h b/include/drivers/tty.h index b50758f..33f74c4 100644 --- a/include/drivers/tty.h +++ b/include/drivers/tty.h @@ -12,7 +12,7 @@ struct tty_serial_ops { struct tty { dev_t dev; void *priv; - struct tty_serial_ops *serial_ops; + struct tty_serial_ops serial_ops; }; void tty_layer_init();