diff options
author | Johan Hovold <johan@kernel.org> | 2021-01-21 11:29:19 +0100 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2021-01-26 16:16:49 +0100 |
commit | 736c09316c905622c548582a47eaa2c8c542b520 (patch) | |
tree | 73eec2e19ebede20fa9bcc37034cd86132c7fb49 /drivers/usb/serial/xr_serial.c | |
parent | USB: serial: xr: clean up line-settings handling (diff) | |
download | linux-736c09316c905622c548582a47eaa2c8c542b520.tar.xz linux-736c09316c905622c548582a47eaa2c8c542b520.zip |
USB: serial: xr: simplify line-speed logic
Simplify the changed-line-speed conditional expression.
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/xr_serial.c')
-rw-r--r-- | drivers/usb/serial/xr_serial.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial/xr_serial.c index 2000277bacc1..fc727f4283f2 100644 --- a/drivers/usb/serial/xr_serial.c +++ b/drivers/usb/serial/xr_serial.c @@ -451,8 +451,7 @@ static void xr_set_termios(struct tty_struct *tty, u8 bits = 0; int ret; - if ((old_termios && tty->termios.c_ospeed != old_termios->c_ospeed) || - !old_termios) + if (!old_termios || (tty->termios.c_ospeed != old_termios->c_ospeed)) xr_set_baudrate(tty, port); switch (C_CSIZE(tty)) { |