USB: ftdi_sio: remove redundant raise of DTR/RTS at open
authorJohan Hovold <jhovold@gmail.com>
Wed, 26 Jun 2013 14:47:33 +0000 (16:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 23:28:22 +0000 (16:28 -0700)
Do not raise DTR/RTS a second time in set_termios at open -- this has
already been taken care of by the tty layer.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/ftdi_sio.c

index abcaeafa525fc813aa924b5eb03170642ef9e7fe..86f6dfe87f863c5c9fdfef9383675d8a7304c3db 100644 (file)
@@ -2187,7 +2187,7 @@ no_data_parity_stop_changes:
                        dev_err(ddev, "%s urb failed to set baudrate\n", __func__);
                mutex_unlock(&priv->cfg_lock);
                /* Ensure RTS and DTR are raised when baudrate changed from 0 */
-               if (!old_termios || (old_termios->c_cflag & CBAUD) == B0)
+               if (old_termios && (old_termios->c_cflag & CBAUD) == B0)
                        set_mctrl(port, TIOCM_DTR | TIOCM_RTS);
        }