Skip to content

Commit

Permalink
serial: core, do not set DTR/RTS twice on startup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Apr 19, 2011
1 parent c7d7abf commit 303a7a1
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions drivers/tty/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1483,20 +1483,6 @@ static void uart_hangup(struct tty_struct *tty)
static void uart_update_termios(struct tty_struct *tty,
struct uart_state *state)
{
struct uart_port *port = state->uart_port;

/*
* 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))) {
/*
* And finally enable the RTS and DTR signals.
*/
if (tty->termios->c_cflag & CBAUD)
uart_set_mctrl(port, TIOCM_DTR | TIOCM_RTS);
}
}

static int uart_carrier_raised(struct tty_port *port)
Expand Down

0 comments on commit 303a7a1

Please sign in to comment.