Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / drivers / tty / n_gsm.c
index 74d9a0258d7c2126c3e34a2781e8ecf03c7281d3..642239015b46bbe9e18844f186a31296a343d5f9 100644 (file)
@@ -2964,6 +2964,10 @@ static void gsmtty_close(struct tty_struct *tty, struct file *filp)
        if (tty_port_close_start(&dlci->port, tty, filp) == 0)
                goto out;
        gsm_dlci_begin_close(dlci);
+       if (test_bit(ASYNCB_INITIALIZED, &dlci->port.flags)) {
+               if (C_HUPCL(tty))
+                       tty_port_lower_dtr_rts(&dlci->port);
+       }
        tty_port_close_end(&dlci->port, tty);
        tty_port_tty_set(&dlci->port, NULL);
 out: