diff options
author | Sergey Organov <sorganov@gmail.com> | 2019-06-26 17:11:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-03 19:35:41 +0200 |
commit | 41ffa48ea7b21330d2e7d87558bb710700da4609 (patch) | |
tree | ee86aa767d9c37326c176877d072dd70339a7bad /drivers/tty | |
parent | 775b7ffd7d6d5db320d99b0a485c51e04dfcf9f1 (diff) | |
download | linux-41ffa48ea7b21330d2e7d87558bb710700da4609.tar.bz2 |
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 <s.hauer@pengutronix.de>
Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sergey Organov <sorganov@gmail.com>
Reviewed-by: Uwe Kleine-Knig <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/1561558293-7683-3-git-send-email-sorganov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/imx.c | 5 |
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) { |