mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
TTY: ircomm, use tty_port_close_end helper
Again, the code is identical, so leverage the helper code. Signed-off-by: Jiri Slaby <[email protected]> Cc: Samuel Ortiz <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
0ba9ff846b
commit
a1e844036a
1 changed files with 1 additions and 15 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue