Skip to content

Commit

Permalink
serial: 8250: Remove superfluous sanity check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lino Sanfilippo authored and Greg Kroah-Hartman committed Apr 9, 2024
1 parent 255abd4 commit 384fa86
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/tty/serial/8250/8250_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 384fa86

Please sign in to comment.