From 9cf65fb6e5aeff8a1b7181628be07a46b83c7d6a Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Wed, 30 Mar 2011 00:10:55 +0200 Subject: [PATCH] --- yaml --- r: 248659 b: refs/heads/master c: c7d7abff40c27f82fe78b1091ab3fad69b2546f9 h: refs/heads/master i: 248657: 2fe38f21c807abaf135da43ad61020f15c4c9ea2 248655: f19f3f5fa9b834aefe0bc0879ee5587d1421148c v: v3 --- [refs] | 2 +- trunk/drivers/tty/serial/serial_core.c | 24 +++++++++--------------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index 39b100a65689..88bcdc665cd7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7c31bdb6b2a7118150df1668444fd1b7f1df3b85 +refs/heads/master: c7d7abff40c27f82fe78b1091ab3fad69b2546f9 diff --git a/trunk/drivers/tty/serial/serial_core.c b/trunk/drivers/tty/serial/serial_core.c index d6e724034492..47657cf4f8b9 100644 --- a/trunk/drivers/tty/serial/serial_core.c +++ b/trunk/drivers/tty/serial/serial_core.c @@ -172,12 +172,16 @@ static int uart_startup(struct tty_struct *tty, struct uart_state *state, int in retval = uport->ops->startup(uport); if (retval == 0) { - if (init_hw) { - /* - * Initialise the hardware port settings. - */ - uart_change_speed(tty, state, NULL); + if (uart_console(uport) && uport->cons->cflag) { + tty->termios->c_cflag = uport->cons->cflag; + uport->cons->cflag = 0; + } + /* + * Initialise the hardware port settings. + */ + uart_change_speed(tty, state, NULL); + if (init_hw) { /* * Setup the RTS and DTR signals once the * port is open and ready to respond. @@ -1481,22 +1485,12 @@ static void uart_update_termios(struct tty_struct *tty, { struct uart_port *port = state->uart_port; - 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, * or some other error occurred, don't try to talk * to the port hardware. */ if (!(tty->flags & (1 << TTY_IO_ERROR))) { - /* - * Make termios settings take effect. - */ - uart_change_speed(tty, state, NULL); - /* * And finally enable the RTS and DTR signals. */