summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250/8250_lpc18xx.c
diff options
context:
space:
mode:
authorLino Sanfilippo <l.sanfilippo@kunbus.com>2022-07-10 18:44:42 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-07-14 16:34:24 +0200
commit5095ca634f8b134cc202a5f5e4985d2b81f0ef0a (patch)
tree5418c440779a6834faf2012a44c4284fcfed769e /drivers/tty/serial/8250/8250_lpc18xx.c
parentc64e17584ba78552b51a27374b54686259826360 (diff)
downloadlinux-stable-5095ca634f8b134cc202a5f5e4985d2b81f0ef0a.tar.gz
linux-stable-5095ca634f8b134cc202a5f5e4985d2b81f0ef0a.tar.bz2
linux-stable-5095ca634f8b134cc202a5f5e4985d2b81f0ef0a.zip
serial: 8250: lpc18xx: Remove redundant sanity check for RS485 flags
Before the drivers rs485_config() function is called the serial core already ensures that only one of both options RTS on send or RTS after send is set. So remove the concerning sanity check in the driver function to avoid redundancy. Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> Link: https://lore.kernel.org/r/20220710164442.2958979-9-LinoSanfilippo@gmx.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250/8250_lpc18xx.c')
-rw-r--r--drivers/tty/serial/8250/8250_lpc18xx.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/tty/serial/8250/8250_lpc18xx.c b/drivers/tty/serial/8250/8250_lpc18xx.c
index d6ca0d47e9d5..6dc85aaba5d0 100644
--- a/drivers/tty/serial/8250/8250_lpc18xx.c
+++ b/drivers/tty/serial/8250/8250_lpc18xx.c
@@ -44,12 +44,8 @@ static int lpc18xx_rs485_config(struct uart_port *port, struct ktermios *termios
rs485_ctrl_reg |= LPC18XX_UART_RS485CTRL_NMMEN |
LPC18XX_UART_RS485CTRL_DCTRL;
- if (rs485->flags & SER_RS485_RTS_ON_SEND) {
+ if (rs485->flags & SER_RS485_RTS_ON_SEND)
rs485_ctrl_reg |= LPC18XX_UART_RS485CTRL_OINV;
- rs485->flags &= ~SER_RS485_RTS_AFTER_SEND;
- } else {
- rs485->flags |= SER_RS485_RTS_AFTER_SEND;
- }
}
if (rs485->delay_rts_after_send) {