diff options
author | Richard Weinberger <richard@nod.at> | 2012-06-04 23:57:24 +0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2012-07-28 19:47:59 +0400 |
commit | 79e0273d187c807dfec8d0cf450b8187cab5d3af (patch) | |
tree | a4db32f26fb7534dd0b9bd11a94e180bb33b2ff8 /arch/um/drivers/stdio_console.c | |
parent | df7b86f313fd26b5021afde7e66b35f9267b1261 (diff) | |
download | linux-79e0273d187c807dfec8d0cf450b8187cab5d3af.tar.xz |
um: fully use tty_port
... use all tty_port helpers
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/drivers/stdio_console.c')
-rw-r--r-- | arch/um/drivers/stdio_console.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c index 5cefdba2e3bf..929b99a261f3 100644 --- a/arch/um/drivers/stdio_console.c +++ b/arch/um/drivers/stdio_console.c @@ -89,21 +89,17 @@ static int con_remove(int n, char **error_out) return line_remove(vts, ARRAY_SIZE(vts), n, error_out); } -static int con_open(struct tty_struct *tty, struct file *filp) -{ - int err = line_open(vts, tty); - if (err) - printk(KERN_ERR "Failed to open console %d, err = %d\n", - tty->index, err); - - return err; -} - /* Set in an initcall, checked in an exitcall */ static int con_init_done = 0; +static int con_install(struct tty_driver *driver, struct tty_struct *tty) +{ + return line_install(driver, tty, &vts[tty->index]); +} + static const struct tty_operations console_ops = { - .open = con_open, + .open = line_open, + .install = con_install, .close = line_close, .write = line_write, .put_char = line_put_char, @@ -114,6 +110,8 @@ static const struct tty_operations console_ops = { .set_termios = line_set_termios, .throttle = line_throttle, .unthrottle = line_unthrottle, + .cleanup = line_cleanup, + .hangup = line_hangup, }; static void uml_console_write(struct console *console, const char *string, |