summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/tty/serial/serial_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/tty/serial/serial_core.c')
-rw-r--r--kernel/drivers/tty/serial/serial_core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/drivers/tty/serial/serial_core.c b/kernel/drivers/tty/serial/serial_core.c
index 0b7bb12df..ec540445b 100644
--- a/kernel/drivers/tty/serial/serial_core.c
+++ b/kernel/drivers/tty/serial/serial_core.c
@@ -1409,7 +1409,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
mutex_lock(&port->mutex);
uart_shutdown(tty, state);
tty_port_tty_set(port, NULL);
- tty->closing = 0;
+
spin_lock_irqsave(&port->lock, flags);
if (port->blocked_open) {
@@ -1435,6 +1435,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
mutex_unlock(&port->mutex);
tty_ldisc_flush(tty);
+ tty->closing = 0;
}
static void uart_wait_until_sent(struct tty_struct *tty, int timeout)