lkml.org 
[lkml]   [2011]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[27/89] serial: core, do not set DTR/RTS twice on startup
    2.6.39-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Jiri Slaby <jslaby@suse.cz>

    commit 303a7a1199c20f7c9452f024a6e17bf348b6b398 upstream.

    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>

    ---
    drivers/tty/serial/serial_core.c | 14 --------------
    1 file changed, 14 deletions(-)

    --- a/drivers/tty/serial/serial_core.c
    +++ b/drivers/tty/serial/serial_core.c
    @@ -1483,20 +1483,6 @@ static void uart_hangup(struct tty_struc
    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)



    \
     
     \ /
      Last update: 2011-06-16 09:03    [W:2.517 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site