Commit 2e01911b authored by Michal Simek's avatar Michal Simek Committed by Greg Kroah-Hartman

Revert "serial: uartps: Fix uartps_major handling"

This reverts commit 5e9bd2d7.

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@localhostReported-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/310999ab5342f788a7bc1b0e68294d4f052cad07.1585905873.git.michal.simek@xilinx.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8f3d9f35
...@@ -1564,6 +1564,7 @@ static int cdns_uart_probe(struct platform_device *pdev) ...@@ -1564,6 +1564,7 @@ static int cdns_uart_probe(struct platform_device *pdev)
goto err_out_id; goto err_out_id;
} }
uartps_major = cdns_uart_uart_driver->tty_driver->major;
cdns_uart_data->cdns_uart_driver = cdns_uart_uart_driver; cdns_uart_data->cdns_uart_driver = cdns_uart_uart_driver;
/* /*
...@@ -1694,7 +1695,6 @@ static int cdns_uart_probe(struct platform_device *pdev) ...@@ -1694,7 +1695,6 @@ static int cdns_uart_probe(struct platform_device *pdev)
console_port = NULL; console_port = NULL;
#endif #endif
uartps_major = cdns_uart_uart_driver->tty_driver->major;
cdns_uart_data->cts_override = of_property_read_bool(pdev->dev.of_node, cdns_uart_data->cts_override = of_property_read_bool(pdev->dev.of_node,
"cts-override"); "cts-override");
return 0; return 0;
...@@ -1756,12 +1756,6 @@ static int cdns_uart_remove(struct platform_device *pdev) ...@@ -1756,12 +1756,6 @@ static int cdns_uart_remove(struct platform_device *pdev)
console_port = NULL; console_port = NULL;
#endif #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); uart_unregister_driver(cdns_uart_data->cdns_uart_driver);
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment