summaryrefslogtreecommitdiff
path: root/arch/um/drivers/ssl.c
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2012-06-04 21:57:24 +0200
committerRichard Weinberger <richard@nod.at>2012-07-28 17:47:59 +0200
commit79e0273d187c807dfec8d0cf450b8187cab5d3af (patch)
treea4db32f26fb7534dd0b9bd11a94e180bb33b2ff8 /arch/um/drivers/ssl.c
parentdf7b86f313fd26b5021afde7e66b35f9267b1261 (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/ssl.c')
-rw-r--r--arch/um/drivers/ssl.c15
1 files changed, 6 insertions, 9 deletions
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