diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-04-02 07:54:00 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-09 14:16:57 -0400 |
commit | 4330d663fed02ace2feba1ab3795ab0c08148a28 (patch) | |
tree | 703e9acf579e879a9d58013d43f1f4fa66850c45 /drivers/isdn/i4l/isdn_tty.c | |
parent | 265d6f00e79166c145421cbca06a20f33332b29f (diff) |
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: Jiri Slaby <jslaby@suse.cz>
Cc: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/isdn/i4l/isdn_tty.c')
-rw-r--r-- | drivers/isdn/i4l/isdn_tty.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index ee8ba87ac524..50d7246b37a1 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c | |||
@@ -1699,13 +1699,8 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp) | |||
1699 | tty_ldisc_flush(tty); | 1699 | tty_ldisc_flush(tty); |
1700 | port->tty = NULL; | 1700 | port->tty = NULL; |
1701 | info->ncarrier = 0; | 1701 | info->ncarrier = 0; |
1702 | tty->closing = 0; | 1702 | |
1703 | if (port->blocked_open) { | 1703 | tty_port_close_end(port, tty); |
1704 | msleep_interruptible(500); | ||
1705 | wake_up_interruptible(&port->open_wait); | ||
1706 | } | ||
1707 | port->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING); | ||
1708 | wake_up_interruptible(&port->close_wait); | ||
1709 | #ifdef ISDN_DEBUG_MODEM_OPEN | 1704 | #ifdef ISDN_DEBUG_MODEM_OPEN |
1710 | printk(KERN_DEBUG "isdn_tty_close normal exit\n"); | 1705 | printk(KERN_DEBUG "isdn_tty_close normal exit\n"); |
1711 | #endif | 1706 | #endif |