]> git.baikalelectronics.ru Git - kernel.git/commitdiff
serial: 8250_fintek: Remove serial_rs485 sanitization
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 6 Jun 2022 10:04:23 +0000 (13:04 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 11:49:57 +0000 (13:49 +0200)
Serial core handles serial_rs485 sanitization and copying rs485 struct.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220606100433.13793-27-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_fintek.c

index 6e98c376e082987417bff247b2bd7e4f09ab412b..1fb86c73786c71d90033b3f16b2f43e89916dbd0 100644 (file)
@@ -206,19 +206,7 @@ static int fintek_8250_rs485_config(struct uart_port *port,
                if (!(rs485->flags & SER_RS485_RTS_ON_SEND) ==
                    !(rs485->flags & SER_RS485_RTS_AFTER_SEND))
                        return -EINVAL;
-               memset(rs485->padding, 0, sizeof(rs485->padding));
                config |= RS485_URA;
-       } else {
-               memset(rs485, 0, sizeof(*rs485));
-       }
-
-       rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND |
-                       SER_RS485_RTS_AFTER_SEND;
-
-       /* Only the first port supports delays */
-       if (pdata->index) {
-               rs485->delay_rts_before_send = 0;
-               rs485->delay_rts_after_send = 0;
        }
 
        if (rs485->delay_rts_before_send) {
@@ -241,8 +229,6 @@ static int fintek_8250_rs485_config(struct uart_port *port,
        sio_write_reg(pdata, RS485, config);
        fintek_8250_exit_key(pdata->base_port);
 
-       port->rs485 = *rs485;
-
        return 0;
 }