FAILED: patch "[PATCH] serial: sh-sci: Fix could not remove dev_attr_rx_fifo_timeout" failed to apply to 4.14-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
641a41dbba217ee5bd26abe6be77f8cead9cd00eMon Sep 17 00:00:00 2001
From: Yoshihiro Shimoda <[email protected]>
Date: Tue, 30 Oct 2018 15:13:35 +0900
Subject: [PATCH] serial: sh-sci: Fix could not remove dev_attr_rx_fifo_timeout
This patch fixes an issue that the sci_remove() could not remove dev_attr_rx_fifo_timeout because uart_remove_one_port() set the port->port.type to PORT_UNKNOWN.
Reported-by Hiromitsu Yamasaki <[email protected]>
Fixes 5d23188a473d ("serial: sh-sci: make RX FIFO parameters tunable via sysfs")
Cc <[email protected]> # v4.11+
Signed-off-by Yoshihiro Shimoda <[email protected]>
Reviewed-by Ulrich Hecht <[email protected]>
Signed-off-by Greg Kroah-Hartman <[email protected]>
drivers/tty/serial/sh-sci.c +2 -2
@@ -3102,6 +3102,7 @@ static struct uart_driver sci_uart_driver = {static int sci_remove (struct platform_device *dev) {struct sci_port *port =platform_get_drvdata (dev); +unsigned int type = port->port.type;/* uart_remove_... clears it */ sci_ports_in_use &= ~BIT (port->port.line);uart_remove_one_port (&sci_uart_driver, &port->port);
@@ -3112,8 +3113,7 @@ static int sci_remove(struct platform_device *dev)sysfs_remove_file (&dev->dev.kobj, &dev_attr_rx_fifo_trigger.attr); } -if (port->port.type ==PORT_SCIFA || port->port.type ==PORT_SCIFB || - port->port.type ==PORT_HSCIF ) { +if (type ==PORT_SCIFA || type ==PORT_SCIFB || type ==PORT_HSCIF ) {sysfs_remove_file (&dev->dev.kobj, &dev_attr_rx_fifo_timeout.attr); }