Patch "serial: ar933x: Remove superfluous code in ar933x_config_rs485()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    serial: ar933x: Remove superfluous code in ar933x_config_rs485()

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     serial-ar933x-remove-superfluous-code-in-ar933x_conf.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5f883654fb7bc06350c4f9c8b07b0690bb946879
Author: Lino Sanfilippo <l.sanfilippo@xxxxxxxxxx>
Date:   Sun Jul 10 18:44:36 2022 +0200

    serial: ar933x: Remove superfluous code in ar933x_config_rs485()
    
    [ Upstream commit 184842622c97da2f88f365a981af05432baa5385 ]
    
    In ar933x_config_rs485() the check for the RTS GPIO is not needed since in
    case the GPIO is not available at driver init ar933x_no_rs485 is assigned
    to port->rs485_supported and this function is never called. So remove the
    check.
    
    Also in uart_set_rs485_config() the serial core already assigns the passed
    serial_rs485 struct to the uart port. So remove the assignment in the
    drivers rs485_config() function to avoid redundancy.
    
    Signed-off-by: Lino Sanfilippo <l.sanfilippo@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220710164442.2958979-3-LinoSanfilippo@xxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Stable-dep-of: 3a939433ddc1 ("serial: ar933x: Deassert Transmit Enable on ->rs485_config()")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c
index c2be7cf91399..be3f5d8f683b 100644
--- a/drivers/tty/serial/ar933x_uart.c
+++ b/drivers/tty/serial/ar933x_uart.c
@@ -585,15 +585,6 @@ static const struct uart_ops ar933x_uart_ops = {
 static int ar933x_config_rs485(struct uart_port *port,
 				struct serial_rs485 *rs485conf)
 {
-	struct ar933x_uart_port *up =
-		container_of(port, struct ar933x_uart_port, port);
-
-	if ((rs485conf->flags & SER_RS485_ENABLED) &&
-	    !up->rts_gpiod) {
-		dev_err(port->dev, "RS485 needs rts-gpio\n");
-		return 1;
-	}
-	port->rs485 = *rs485conf;
 	return 0;
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux