Skip to content

Commit 91c9dfa

Browse files
Michal Simekgregkh
authored andcommitted
Revert "serial: uartps: Do not allow use aliases >= MAX_UART_INSTANCES"
This reverts commit 2088cfd. 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 <[email protected]> Signed-off-by: Michal Simek <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/dac3898e3e32d963f357fb436ac9a7ac3cbcf933.1585905873.git.michal.simek@xilinx.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b6fd2db commit 91c9dfa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/tty/serial/xilinx_uartps.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,8 +1712,7 @@ static int cdns_uart_probe(struct platform_device *pdev)
17121712
uart_unregister_driver(cdns_uart_data->cdns_uart_driver);
17131713
err_out_id:
17141714
mutex_lock(&bitmap_lock);
1715-
if (cdns_uart_data->id < MAX_UART_INSTANCES)
1716-
clear_bit(cdns_uart_data->id, bitmap);
1715+
clear_bit(cdns_uart_data->id, bitmap);
17171716
mutex_unlock(&bitmap_lock);
17181717
return rc;
17191718
}
@@ -1738,8 +1737,7 @@ static int cdns_uart_remove(struct platform_device *pdev)
17381737
rc = uart_remove_one_port(cdns_uart_data->cdns_uart_driver, port);
17391738
port->mapbase = 0;
17401739
mutex_lock(&bitmap_lock);
1741-
if (cdns_uart_data->id < MAX_UART_INSTANCES)
1742-
clear_bit(cdns_uart_data->id, bitmap);
1740+
clear_bit(cdns_uart_data->id, bitmap);
17431741
mutex_unlock(&bitmap_lock);
17441742
clk_disable_unprepare(cdns_uart_data->uartclk);
17451743
clk_disable_unprepare(cdns_uart_data->pclk);

0 commit comments

Comments
 (0)