TTY: use tty_standard_install
[firefly-linux-kernel-4.4.55.git] / drivers / tty / nozomi.c
index fd347ff34d071dc14972faaa2d3e89ef9260475c..580da78b2d8692c89ce4d6cfb139eabd2b1c97b7 100644 (file)
@@ -1602,13 +1602,9 @@ static int ntty_install(struct tty_driver *driver, struct tty_struct *tty)
        int ret;
        if (!port || !dc || dc->state != NOZOMI_STATE_READY)
                return -ENODEV;
-       ret = tty_init_termios(tty);
-       if (ret == 0) {
-               tty_driver_kref_get(driver);
-               tty->count++;
+       ret = tty_standard_install(driver, tty);
+       if (ret == 0)
                tty->driver_data = port;
-               driver->ttys[tty->index] = tty;
-       }
        return ret;
 }