]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/um/drivers/chan_kern.c
TTY: add tty_port_tty_hangup helper
[karo-tx-linux.git] / arch / um / drivers / chan_kern.c
index 15c553c239a119259f2f948f8381e5a9a26f4ccb..bf42825ba54f4ecc527d84eae021783affcf50c6 100644 (file)
@@ -568,11 +568,7 @@ void chan_interrupt(struct line *line, int irq)
                reactivate_fd(chan->fd, irq);
        if (err == -EIO) {
                if (chan->primary) {
-                       struct tty_struct *tty = tty_port_tty_get(&line->port);
-                       if (tty != NULL) {
-                               tty_hangup(tty);
-                               tty_kref_put(tty);
-                       }
+                       tty_port_tty_hangup(&line->port, false);
                        if (line->chan_out != chan)
                                close_one_chan(line->chan_out, 1);
                }