From 79e0273d187c807dfec8d0cf450b8187cab5d3af Mon Sep 17 00:00:00 2001 From: Richard Weinberger Date: Mon, 4 Jun 2012 21:57:24 +0200 Subject: um: fully use tty_port ... use all tty_port helpers Signed-off-by: Richard Weinberger --- arch/um/drivers/ssl.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'arch/um/drivers/ssl.c') diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c index cba95d959af1..7e86f0070123 100644 --- a/arch/um/drivers/ssl.c +++ b/arch/um/drivers/ssl.c @@ -87,19 +87,13 @@ static int ssl_remove(int n, char **error_out) error_out); } -static int ssl_open(struct tty_struct *tty, struct file *filp) +static int ssl_install(struct tty_driver *driver, struct tty_struct *tty) { - int err = line_open(serial_lines, tty); - - if (err) - printk(KERN_ERR "Failed to open serial line %d, err = %d\n", - tty->index, err); - - return err; + return line_install(driver, tty, &serial_lines[tty->index]); } static const struct tty_operations ssl_ops = { - .open = ssl_open, + .open = line_open, .close = line_close, .write = line_write, .put_char = line_put_char, @@ -110,6 +104,9 @@ static const struct tty_operations ssl_ops = { .set_termios = line_set_termios, .throttle = line_throttle, .unthrottle = line_unthrottle, + .install = ssl_install, + .cleanup = line_cleanup, + .hangup = line_hangup, }; /* Changed by ssl_init and referenced by ssl_exit, which are both serialized -- cgit v1.2.1