serial: imx: set_termios(): clarify RTS/CTS bits calculation
authorSergey Organov <sorganov@gmail.com>
Wed, 26 Jun 2019 14:11:29 +0000 (17:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jul 2019 17:35:41 +0000 (19:35 +0200)
commitddf89e7503deb931403add648b67545ec196c3fe
treec6475bec43b4fccbc16bdfd2005aab396b7c2163
parent41ffa48ea7b21330d2e7d87558bb710700da4609
serial: imx: set_termios(): clarify RTS/CTS bits calculation

Avoid repeating the same code for rs485 twice.

Make it obvious we clear CRTSCTS bit in termios->c_cflag whenever
sport->have_rtscts is false.

Make it obvious we clear UCR2_IRTS whenever CRTSCTS is set.

Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sergey Organov <sorganov@gmail.com>
Link: https://lore.kernel.org/r/1561558293-7683-4-git-send-email-sorganov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c