[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210121102922.17439-9-johan@kernel.org>
Date: Thu, 21 Jan 2021 11:29:19 +0100
From: Johan Hovold <johan@...nel.org>
To: linux-usb@...r.kernel.org
Cc: Manivannan Sadhasivam <mani@...nel.org>,
linux-kernel@...r.kernel.org, Johan Hovold <johan@...nel.org>
Subject: [PATCH 07/10] USB: serial: xr: simplify line-speed logic
Simplify the changed-line-speed conditional expression.
Signed-off-by: Johan Hovold <johan@...nel.org>
---
drivers/usb/serial/xr_serial.c | 3 +--
1 file changed, 1 insertion(+), 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)) {
--
2.26.2
Powered by blists - more mailing lists