serial: 8250_dwlib: Remove serial_rs485 sanitization
Serial core handles serial_rs485 sanitization and rs485 struct assignment. As serial_rs485 is already clear for the non-RS485 case by serial core, there no need to clear flags in the driver. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220606100433.13793-26-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
51ad36baac
commit
9cdaf4fc2e
|
@ -93,9 +93,6 @@ static int dw8250_rs485_config(struct uart_port *p, struct serial_rs485 *rs485)
|
|||
tcr &= ~DW_UART_TCR_XFER_MODE;
|
||||
|
||||
if (rs485->flags & SER_RS485_ENABLED) {
|
||||
/* Clear unsupported flags. */
|
||||
rs485->flags &= SER_RS485_ENABLED | SER_RS485_RX_DURING_TX |
|
||||
SER_RS485_RTS_ON_SEND | SER_RS485_RTS_AFTER_SEND;
|
||||
tcr |= DW_UART_TCR_RS485_EN;
|
||||
|
||||
if (rs485->flags & SER_RS485_RX_DURING_TX) {
|
||||
|
@ -111,8 +108,6 @@ static int dw8250_rs485_config(struct uart_port *p, struct serial_rs485 *rs485)
|
|||
dw8250_writel_ext(p, DW_UART_DE_EN, 1);
|
||||
dw8250_writel_ext(p, DW_UART_RE_EN, 1);
|
||||
} else {
|
||||
rs485->flags = 0;
|
||||
|
||||
tcr &= ~DW_UART_TCR_RS485_EN;
|
||||
}
|
||||
|
||||
|
@ -127,11 +122,6 @@ static int dw8250_rs485_config(struct uart_port *p, struct serial_rs485 *rs485)
|
|||
|
||||
dw8250_writel_ext(p, DW_UART_TCR, tcr);
|
||||
|
||||
rs485->delay_rts_before_send = 0;
|
||||
rs485->delay_rts_after_send = 0;
|
||||
|
||||
p->rs485 = *rs485;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue