From: Sergey Organov Date: Wed, 26 Jun 2019 14:11:28 +0000 (+0300) Subject: serial: imx: set_termios(): factor-out 'ucr2' initial value X-Git-Tag: tags/kvm-5.3-2~40^2~3 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=41ffa48ea7b21330d2e7d87558bb710700da4609;p=users%2Fdwmw2%2Flinux.git 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 Tested-by: Sascha Hauer Signed-off-by: Sergey Organov Reviewed-by: Uwe Kleine-Knig Link: https://lore.kernel.org/r/1561558293-7683-3-git-send-email-sorganov@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 52374b37d272a..df2186cac6151 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) {