Merge 4.1-rc4 into tty-next
[firefly-linux-kernel-4.4.55.git] / drivers / tty / n_gsm.c
index 91abc00aa833b8493fe721e05024cd8368e23aa6..c408689a85a94b6ea941c834db76db3195a46079 100644 (file)
@@ -2274,7 +2274,6 @@ static void gsmld_receive_buf(struct tty_struct *tty, const unsigned char *cp,
        const unsigned char *dp;
        char *f;
        int i;
-       char buf[64];
        char flags = TTY_NORMAL;
 
        if (debug & 4)
@@ -2296,7 +2295,7 @@ static void gsmld_receive_buf(struct tty_struct *tty, const unsigned char *cp,
                        break;
                default:
                        WARN_ONCE(1, "%s: unknown flag %d\n",
-                              tty_name(tty, buf), flags);
+                              tty_name(tty), flags);
                        break;
                }
        }
@@ -3170,7 +3169,7 @@ static int gsmtty_break_ctl(struct tty_struct *tty, int state)
        return gsmtty_modem_update(dlci, encode);
 }
 
-static void gsmtty_remove(struct tty_driver *driver, struct tty_struct *tty)
+static void gsmtty_cleanup(struct tty_struct *tty)
 {
        struct gsm_dlci *dlci = tty->driver_data;
        struct gsm_mux *gsm = dlci->gsm;
@@ -3178,7 +3177,6 @@ static void gsmtty_remove(struct tty_driver *driver, struct tty_struct *tty)
        dlci_put(dlci);
        dlci_put(gsm->dlci[0]);
        mux_put(gsm);
-       driver->ttys[tty->index] = NULL;
 }
 
 /* Virtual ttys for the demux */
@@ -3199,7 +3197,7 @@ static const struct tty_operations gsmtty_ops = {
        .tiocmget               = gsmtty_tiocmget,
        .tiocmset               = gsmtty_tiocmset,
        .break_ctl              = gsmtty_break_ctl,
-       .remove                 = gsmtty_remove,
+       .cleanup                = gsmtty_cleanup,
 };