Commit 4330d663 authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman

TTY: isdn, use tty_port_close_end helper

The code does almost the same, so there we can leverage the helper's
code. The only difference is locking. The helper protects counts by a
spinlock. This never hurts and should be added to other code parts
too.
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Cc: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 265d6f00
...@@ -1699,13 +1699,8 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp) ...@@ -1699,13 +1699,8 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
tty_ldisc_flush(tty); tty_ldisc_flush(tty);
port->tty = NULL; port->tty = NULL;
info->ncarrier = 0; info->ncarrier = 0;
tty->closing = 0;
if (port->blocked_open) { tty_port_close_end(port, tty);
msleep_interruptible(500);
wake_up_interruptible(&port->open_wait);
}
port->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
wake_up_interruptible(&port->close_wait);
#ifdef ISDN_DEBUG_MODEM_OPEN #ifdef ISDN_DEBUG_MODEM_OPEN
printk(KERN_DEBUG "isdn_tty_close normal exit\n"); printk(KERN_DEBUG "isdn_tty_close normal exit\n");
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment