diff options
author | Richard Weinberger <richard@nod.at> | 2012-06-04 15:57:24 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2012-07-28 11:47:59 -0400 |
commit | 79e0273d187c807dfec8d0cf450b8187cab5d3af (patch) | |
tree | a4db32f26fb7534dd0b9bd11a94e180bb33b2ff8 /arch/um/drivers/stdio_console.c | |
parent | df7b86f313fd26b5021afde7e66b35f9267b1261 (diff) |
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) | |||
89 | return line_remove(vts, ARRAY_SIZE(vts), n, error_out); | 89 | return line_remove(vts, ARRAY_SIZE(vts), n, error_out); |
90 | } | 90 | } |
91 | 91 | ||
92 | static int con_open(struct tty_struct *tty, struct file *filp) | ||
93 | { | ||
94 | int err = line_open(vts, tty); | ||
95 | if (err) | ||
96 | printk(KERN_ERR "Failed to open console %d, err = %d\n", | ||
97 | tty->index, err); | ||
98 | |||
99 | return err; | ||
100 | } | ||
101 | |||
102 | /* Set in an initcall, checked in an exitcall */ | 92 | /* Set in an initcall, checked in an exitcall */ |
103 | static int con_init_done = 0; | 93 | static int con_init_done = 0; |
104 | 94 | ||
95 | static int con_install(struct tty_driver *driver, struct tty_struct *tty) | ||
96 | { | ||
97 | return line_install(driver, tty, &vts[tty->index]); | ||
98 | } | ||
99 | |||
105 | static const struct tty_operations console_ops = { | 100 | static const struct tty_operations console_ops = { |
106 | .open = con_open, | 101 | .open = line_open, |
102 | .install = con_install, | ||
107 | .close = line_close, | 103 | .close = line_close, |
108 | .write = line_write, | 104 | .write = line_write, |
109 | .put_char = line_put_char, | 105 | .put_char = line_put_char, |
@@ -114,6 +110,8 @@ static const struct tty_operations console_ops = { | |||
114 | .set_termios = line_set_termios, | 110 | .set_termios = line_set_termios, |
115 | .throttle = line_throttle, | 111 | .throttle = line_throttle, |
116 | .unthrottle = line_unthrottle, | 112 | .unthrottle = line_unthrottle, |
113 | .cleanup = line_cleanup, | ||
114 | .hangup = line_hangup, | ||
117 | }; | 115 | }; |
118 | 116 | ||
119 | static void uml_console_write(struct console *console, const char *string, | 117 | static void uml_console_write(struct console *console, const char *string, |