diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2011-05-26 14:43:28 +0900 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2011-05-27 19:53:31 -0700 |
commit | 9c93cbac2a72e238229ecb070cbf7d4791c11cb8 (patch) | |
tree | c48e86b7d9ae73f2c197410355f33cf71d020751 | |
parent | 805d703deb4d7d6f0d719b07b62c491c95abd0ad (diff) |
serial-core: keep value of console cflag in uart_update_termios
uart_update_termios is called on console resume and restores the line
parameters using cons->cflag before resetting it. However code in
uart_resume_port does the same afterwards, applying a 0 value to the
port's cflag and erasing the correct setting. This patch preserves the
value of cflag in uart_update_termios to prevent this and allow the
serial console to restore properly even if there is no program using it
on user side.
Serial code has been largely refactored upstream in the upstream kernel
and faulty code apparently removed.
Fixes bug 831077
Change-Id: Ia894f971d9b6bb0c6103dbca9d169dc2a2148f84
Reviewed-on: http://git-master/r/33098
Reviewed-by: Alex Courbot <acourbot@nvidia.com>
Tested-by: Alex Courbot <acourbot@nvidia.com>
Reviewed-by: David Schalig <dschalig@nvidia.com>
Reviewed-by: Janne Hellsten <jhellsten@nvidia.com>
-rw-r--r-- | drivers/serial/serial_core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 4c008f08a987..3132fd466291 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -1493,10 +1493,8 @@ static void uart_update_termios(struct tty_struct *tty, { struct uart_port *port = state->uart_port; - if (uart_console(port) && port->cons->cflag) { + if (uart_console(port) && port->cons->cflag) tty->termios->c_cflag = port->cons->cflag; - port->cons->cflag = 0; - } /* * If the device failed to grab its irq resources, |