aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2020-04-03 11:24:30 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-29 16:33:24 +0200
commit1bb43b4d8c32c6d2ffc005206a83b8df04314f42 (patch)
tree5fffe05a2af54d5e250663e44471feba6ef4d34d
parent3af0614df15c1c1fbfafed4888f12d76a7b044e1 (diff)
downloadlinux-yocto-1bb43b4d8c32c6d2ffc005206a83b8df04314f42.tar.gz
linux-yocto-1bb43b4d8c32c6d2ffc005206a83b8df04314f42.tar.bz2
linux-yocto-1bb43b4d8c32c6d2ffc005206a83b8df04314f42.zip
Revert "serial: uartps: Fix uartps_major handling"
commit 2e01911b7cf7aa07a304a809eca1b11a4bd35859 upstream. This reverts commit 5e9bd2d70ae7c00a95a22994abf1eef728649e64. As Johan says, this driver needs a lot more work and these changes are only going in the wrong direction: https://lkml.kernel.org/r/20190523091839.GC568@localhost Reported-by: Johan Hovold <johan@kernel.org> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/310999ab5342f788a7bc1b0e68294d4f052cad07.1585905873.git.michal.simek@xilinx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/xilinx_uartps.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 4e55bc327a54..da4563aaaf5c 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -1550,6 +1550,7 @@ static int cdns_uart_probe(struct platform_device *pdev)
goto err_out_id;
}
+ uartps_major = cdns_uart_uart_driver->tty_driver->major;
cdns_uart_data->cdns_uart_driver = cdns_uart_uart_driver;
/*
@@ -1679,7 +1680,6 @@ static int cdns_uart_probe(struct platform_device *pdev)
console_port = NULL;
#endif
- uartps_major = cdns_uart_uart_driver->tty_driver->major;
cdns_uart_data->cts_override = of_property_read_bool(pdev->dev.of_node,
"cts-override");
return 0;
@@ -1741,12 +1741,6 @@ static int cdns_uart_remove(struct platform_device *pdev)
console_port = NULL;
#endif
- /* If this is last instance major number should be initialized */
- mutex_lock(&bitmap_lock);
- if (bitmap_empty(bitmap, MAX_UART_INSTANCES))
- uartps_major = 0;
- mutex_unlock(&bitmap_lock);
-
uart_unregister_driver(cdns_uart_data->cdns_uart_driver);
return rc;
}