OSDN Git Service

um: fully use tty_port
[android-x86/kernel.git] / arch / um / drivers / ssl.c
index e09801a..7e86f00 100644 (file)
@@ -87,40 +87,13 @@ static int ssl_remove(int n, char **error_out)
                           error_out);
 }
 
-static int ssl_open(struct tty_struct *tty, struct file *filp)
-{
-       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;
-}
-
-#if 0
-static void ssl_flush_buffer(struct tty_struct *tty)
-{
-       return;
-}
-
-static void ssl_stop(struct tty_struct *tty)
-{
-       printk(KERN_ERR "Someone should implement ssl_stop\n");
-}
-
-static void ssl_start(struct tty_struct *tty)
-{
-       printk(KERN_ERR "Someone should implement ssl_start\n");
-}
-
-void ssl_hangup(struct tty_struct *tty)
+static int ssl_install(struct tty_driver *driver, struct tty_struct *tty)
 {
+       return line_install(driver, tty, &serial_lines[tty->index]);
 }
-#endif
 
 static const struct tty_operations ssl_ops = {
-       .open                   = ssl_open,
+       .open                   = line_open,
        .close                  = line_close,
        .write                  = line_write,
        .put_char               = line_put_char,
@@ -129,14 +102,11 @@ static const struct tty_operations ssl_ops = {
        .flush_buffer           = line_flush_buffer,
        .flush_chars            = line_flush_chars,
        .set_termios            = line_set_termios,
-       .ioctl                  = line_ioctl,
        .throttle               = line_throttle,
        .unthrottle             = line_unthrottle,
-#if 0
-       .stop                   = ssl_stop,
-       .start                  = ssl_start,
-       .hangup                 = ssl_hangup,
-#endif
+       .install                = ssl_install,
+       .cleanup                = line_cleanup,
+       .hangup                 = line_hangup,
 };
 
 /* Changed by ssl_init and referenced by ssl_exit, which are both serialized