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>
This commit is contained in:
parent
775b7ffd7d
commit
41ffa48ea7
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue