summaryrefslogtreecommitdiff
path: root/net/irda/ircomm
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-06-04 11:35:24 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-12 22:50:24 (GMT)
commita1e844036af9cb0d87e878a4f90ce64713c76e5a (patch)
treef9294fbe861fae68493f93648ed5d6350e3d7fe9 /net/irda/ircomm
parent0ba9ff846b2f4720e30ace37b028ef14fb97fb74 (diff)
downloadlinux-a1e844036af9cb0d87e878a4f90ce64713c76e5a.tar.xz
TTY: ircomm, use tty_port_close_end helper
Again, the code is identical, so leverage the helper code. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Samuel Ortiz <samuel@sortiz.org> Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/irda/ircomm')
-rw-r--r--net/irda/ircomm/ircomm_tty.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
index 3fdce18..cfe352d 100644
--- a/net/irda/ircomm/ircomm_tty.c
+++ b/net/irda/ircomm/ircomm_tty.c
@@ -568,21 +568,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
tty_driver_flush_buffer(tty);
tty_ldisc_flush(tty);
- spin_lock_irqsave(&port->lock, flags);
- tty->closing = 0;
-
- if (port->blocked_open) {
- if (port->close_delay) {
- spin_unlock_irqrestore(&port->lock, flags);
- schedule_timeout_interruptible(port->close_delay);
- spin_lock_irqsave(&port->lock, flags);
- }
- wake_up_interruptible(&port->open_wait);
- }
-
- port->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
- spin_unlock_irqrestore(&port->lock, flags);
- wake_up_interruptible(&port->close_wait);
+ tty_port_close_end(port, tty);
tty_port_tty_set(port, NULL);
}