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();