tty: make ops struct not a pointer
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
bba8fc7476
commit
f177a8e65d
2 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue