Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-07-16 16:23:44 +0200
committerTakashi Iwai <tiwai@suse.de>2019-07-16 16:23:53 +0200
commit3902c9396b364fcdba2040f1c28d705e8be9ef2d (patch)
tree913f2f10c76a95fb90e87b076e02fc62a9d2b6b9
parent080bb5066c33e24043c5a6dd2e8f29854db3f488 (diff)
tty: serial_core: Set port active bit in uart_port_activate
(bsc#1051510). suse-commit: e97eb16c0d193055d76308549fc364ed64747bac
-rw-r--r--drivers/tty/serial/serial_core.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index d7692eb3d185..6bb0cbacff90 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -1737,6 +1737,7 @@ static int uart_port_activate(struct tty_port *port, struct tty_struct *tty)
{
struct uart_state *state = container_of(port, struct uart_state, port);
struct uart_port *uport;
+ int ret;
uport = uart_port_check(state);
if (!uport || uport->flags & UPF_DEAD)
@@ -1747,7 +1748,11 @@ static int uart_port_activate(struct tty_port *port, struct tty_struct *tty)
/*
* Start up the serial port.
*/
- return uart_startup(tty, state, 0);
+ ret = uart_startup(tty, state, 0);
+ if (ret > 0)
+ tty_port_set_active(port, 1);
+
+ return ret;
}
static const char *uart_type(struct uart_port *port)