Patch "serial: ar933x: Remove superfluous code in ar933x_config_rs485()" has been added to the 5.15-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.15-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.15 subdirectory.

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



commit 5aa54b067a13313f3088aed18bcc55bbe955e38c
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 4379ca4842ae..7e89e563359a 100644
--- a/drivers/tty/serial/ar933x_uart.c
+++ b/drivers/tty/serial/ar933x_uart.c
@@ -583,15 +583,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