aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2011-03-29 18:10:56 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-19 19:32:20 -0400
commit303a7a1199c20f7c9452f024a6e17bf348b6b398 (patch)
treef3db2311d9156981f4d3d99aaf65b1ef646f887b /drivers/tty
parentc7d7abff40c27f82fe78b1091ab3fad69b2546f9 (diff)
serial: core, do not set DTR/RTS twice on startup
In .dtr_rts we do: uart_set_mctrl(uport, TIOCM_DTR | TIOCM_RTS) and call uart_update_termios. It does: uart_set_mctrl(port, TIOCM_DTR | TIOCM_RTS) once again. As the only callsite of uart_update_termios is .dtr_rts, remove the uart_set_mctrl from uart_update_termios to not set it twice. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/serial_core.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 47657cf4f8b9..3aae8ed2a8f5 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -1483,20 +1483,6 @@ static void uart_hangup(struct tty_struct *tty)
1483static void uart_update_termios(struct tty_struct *tty, 1483static void uart_update_termios(struct tty_struct *tty,
1484 struct uart_state *state) 1484 struct uart_state *state)
1485{ 1485{
1486 struct uart_port *port = state->uart_port;
1487
1488 /*
1489 * If the device failed to grab its irq resources,
1490 * or some other error occurred, don't try to talk
1491 * to the port hardware.
1492 */
1493 if (!(tty->flags & (1 << TTY_IO_ERROR))) {
1494 /*
1495 * And finally enable the RTS and DTR signals.
1496 */
1497 if (tty->termios->c_cflag & CBAUD)
1498 uart_set_mctrl(port, TIOCM_DTR | TIOCM_RTS);
1499 }
1500} 1486}
1501 1487
1502static int uart_carrier_raised(struct tty_port *port) 1488static int uart_carrier_raised(struct tty_port *port)