Commit 91c9dfa2 authored by Michal Simek's avatar Michal Simek Committed by Greg Kroah-Hartman

Revert "serial: uartps: Do not allow use aliases >= MAX_UART_INSTANCES"

This reverts commit 2088cfd8.

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/dac3898e3e32d963f357fb436ac9a7ac3cbcf933.1585905873.git.michal.simek@xilinx.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b6fd2dbb
...@@ -1712,8 +1712,7 @@ static int cdns_uart_probe(struct platform_device *pdev) ...@@ -1712,8 +1712,7 @@ static int cdns_uart_probe(struct platform_device *pdev)
uart_unregister_driver(cdns_uart_data->cdns_uart_driver); uart_unregister_driver(cdns_uart_data->cdns_uart_driver);
err_out_id: err_out_id:
mutex_lock(&bitmap_lock); mutex_lock(&bitmap_lock);
if (cdns_uart_data->id < MAX_UART_INSTANCES) clear_bit(cdns_uart_data->id, bitmap);
clear_bit(cdns_uart_data->id, bitmap);
mutex_unlock(&bitmap_lock); mutex_unlock(&bitmap_lock);
return rc; return rc;
} }
...@@ -1738,8 +1737,7 @@ static int cdns_uart_remove(struct platform_device *pdev) ...@@ -1738,8 +1737,7 @@ static int cdns_uart_remove(struct platform_device *pdev)
rc = uart_remove_one_port(cdns_uart_data->cdns_uart_driver, port); rc = uart_remove_one_port(cdns_uart_data->cdns_uart_driver, port);
port->mapbase = 0; port->mapbase = 0;
mutex_lock(&bitmap_lock); mutex_lock(&bitmap_lock);
if (cdns_uart_data->id < MAX_UART_INSTANCES) clear_bit(cdns_uart_data->id, bitmap);
clear_bit(cdns_uart_data->id, bitmap);
mutex_unlock(&bitmap_lock); mutex_unlock(&bitmap_lock);
clk_disable_unprepare(cdns_uart_data->uartclk); clk_disable_unprepare(cdns_uart_data->uartclk);
clk_disable_unprepare(cdns_uart_data->pclk); clk_disable_unprepare(cdns_uart_data->pclk);
......
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