serial-uartlite: Add get serial id if not provided
Add get serial id if not provided Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
f33cf77661
Коммит
62104b280a
|
@ -763,6 +763,13 @@ static int ulite_probe(struct platform_device *pdev)
|
|||
if (prop)
|
||||
id = be32_to_cpup(prop);
|
||||
#endif
|
||||
if (id < 0) {
|
||||
/* Look for a serialN alias */
|
||||
id = of_alias_get_id(pdev->dev.of_node, "serial");
|
||||
if (id < 0)
|
||||
id = 0;
|
||||
}
|
||||
|
||||
if (!ulite_uart_driver.state) {
|
||||
dev_dbg(&pdev->dev, "uartlite: calling uart_register_driver()\n");
|
||||
ret = uart_register_driver(&ulite_uart_driver);
|
||||
|
|
Загрузка…
Ссылка в новой задаче