Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torvalds/linux.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2017-07-18 13:59:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-30 17:46:06 +0300
commit68c338eaa0bf3e399a1b96ac35d909f0b475208f (patch)
tree6f05833cf29b5e9dd6f5be620660a36cfedad6b4 /drivers/tty/serial/fsl_lpuart.c
parent7d8905d064058f4b65057e0101588f362f288bc0 (diff)
serial: fsl_lpuart: clear unsupported options in .rs485_config()
The struct serial_rs485 parameter is both input and output and is supposed to hold the actually used configuration on return. So clear unsupported settings. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/fsl_lpuart.c')
-rw-r--r--drivers/tty/serial/fsl_lpuart.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 5b4721bd70f0..d24270fe3cbe 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1076,6 +1076,11 @@ static int lpuart_config_rs485(struct uart_port *port,
~(UARTMODEM_TXRTSPOL | UARTMODEM_TXRTSE);
writeb(modem, sport->port.membase + UARTMODEM);
+ /* clear unsupported configurations */
+ rs485->delay_rts_before_send = 0;
+ rs485->delay_rts_after_send = 0;
+ rs485->flags &= ~SER_RS485_RX_DURING_TX;
+
if (rs485->flags & SER_RS485_ENABLED) {
/* Enable auto RS-485 RTS mode */
modem |= UARTMODEM_TXRTSE;