summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLino Sanfilippo <l.sanfilippo@kunbus.com>2024-04-07 02:27:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-09 17:07:10 +0200
commit384fa8647dc55ab47515bbb76ebda37b2350e5b3 (patch)
tree160ac59f015188cc30165f2a7b251c5db12abcbc
parent255abd49f18533300bc5f20d7dce77a0a4479f58 (diff)
downloadlinux-stable-384fa8647dc55ab47515bbb76ebda37b2350e5b3.tar.gz
linux-stable-384fa8647dc55ab47515bbb76ebda37b2350e5b3.tar.bz2
linux-stable-384fa8647dc55ab47515bbb76ebda37b2350e5b3.zip
serial: 8250: Remove superfluous sanity check
The serial core already checks the RS485 RTS settings for sanity, so remove the superfluous check in serial8250_em485_config(). Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> Link: https://lore.kernel.org/r/20240407002709.16224-4-l.sanfilippo@kunbus.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/8250/8250_port.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 0c19451d0332..893bc493f662 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -612,13 +612,6 @@ int serial8250_em485_config(struct uart_port *port, struct ktermios *termios,
{
struct uart_8250_port *up = up_to_u8250p(port);
- /* pick sane settings if the user hasn't */
- if (!!(rs485->flags & SER_RS485_RTS_ON_SEND) ==
- !!(rs485->flags & SER_RS485_RTS_AFTER_SEND)) {
- rs485->flags |= SER_RS485_RTS_ON_SEND;
- rs485->flags &= ~SER_RS485_RTS_AFTER_SEND;
- }
-
/*
* Both serial8250_em485_init() and serial8250_em485_destroy()
* are idempotent.