aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Organov <[email protected]>2019-06-26 17:11:28 +0300
committerGreg Kroah-Hartman <[email protected]>2019-07-03 19:35:41 +0200
commit41ffa48ea7b21330d2e7d87558bb710700da4609 (patch)
treeee86aa767d9c37326c176877d072dd70339a7bad
parent775b7ffd7d6d5db320d99b0a485c51e04dfcf9f1 (diff)
serial: imx: set_termios(): factor-out 'ucr2' initial value
Set common bits in a separate statement to make initialization explicit and not repeat the common part. Reviewed-by: Sascha Hauer <[email protected]> Tested-by: Sascha Hauer <[email protected]> Signed-off-by: Sergey Organov <[email protected]> Reviewed-by: Uwe Kleine-Knig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/tty/serial/imx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 52374b37d272..df2186cac615 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1562,10 +1562,9 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios,
spin_lock_irqsave(&sport->port.lock, flags);
+ ucr2 = UCR2_SRST | UCR2_IRTS;
if ((termios->c_cflag & CSIZE) == CS8)
- ucr2 = UCR2_WS | UCR2_SRST | UCR2_IRTS;
- else
- ucr2 = UCR2_SRST | UCR2_IRTS;
+ ucr2 |= UCR2_WS;
if (termios->c_cflag & CRTSCTS) {
if (sport->have_rtscts) {