提交 41ffa48e 编写于 作者: S Sergey Organov 提交者: Greg Kroah-Hartman

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: NSascha Hauer <s.hauer@pengutronix.de>
Tested-by: NSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: NSergey Organov <sorganov@gmail.com>
Reviewed-by: NUwe Kleine-Knig <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/1561558293-7683-3-git-send-email-sorganov@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 775b7ffd
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册