File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1550,7 +1550,6 @@ static int cdns_uart_probe(struct platform_device *pdev)
1550
1550
goto err_out_id ;
1551
1551
}
1552
1552
1553
- uartps_major = cdns_uart_uart_driver -> tty_driver -> major ;
1554
1553
cdns_uart_data -> cdns_uart_driver = cdns_uart_uart_driver ;
1555
1554
1556
1555
/*
@@ -1680,6 +1679,7 @@ static int cdns_uart_probe(struct platform_device *pdev)
1680
1679
console_port = NULL ;
1681
1680
#endif
1682
1681
1682
+ uartps_major = cdns_uart_uart_driver -> tty_driver -> major ;
1683
1683
cdns_uart_data -> cts_override = of_property_read_bool (pdev -> dev .of_node ,
1684
1684
"cts-override" );
1685
1685
return 0 ;
@@ -1741,6 +1741,12 @@ static int cdns_uart_remove(struct platform_device *pdev)
1741
1741
console_port = NULL ;
1742
1742
#endif
1743
1743
1744
+ /* If this is last instance major number should be initialized */
1745
+ mutex_lock (& bitmap_lock );
1746
+ if (bitmap_empty (bitmap , MAX_UART_INSTANCES ))
1747
+ uartps_major = 0 ;
1748
+ mutex_unlock (& bitmap_lock );
1749
+
1744
1750
uart_unregister_driver (cdns_uart_data -> cdns_uart_driver );
1745
1751
return rc ;
1746
1752
}
You can’t perform that action at this time.
0 commit comments