Skip to content

Commit f4c4754

Browse files
committed
Revert "serial-uartlite: Move the uart register"
This reverts commit f33cf77. 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]> Cc: Shubhrajyoti Datta <[email protected]> Cc: Michal Simek <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4c51689 commit f4c4754

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/tty/serial/uartlite.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -763,15 +763,6 @@ static int ulite_probe(struct platform_device *pdev)
763763
if (prop)
764764
id = be32_to_cpup(prop);
765765
#endif
766-
if (!ulite_uart_driver.state) {
767-
dev_dbg(&pdev->dev, "uartlite: calling uart_register_driver()\n");
768-
ret = uart_register_driver(&ulite_uart_driver);
769-
if (ret < 0) {
770-
dev_err(&pdev->dev, "Failed to register driver\n");
771-
return ret;
772-
}
773-
}
774-
775766
pdata = devm_kzalloc(&pdev->dev, sizeof(struct uartlite_data),
776767
GFP_KERNEL);
777768
if (!pdata)
@@ -803,6 +794,15 @@ static int ulite_probe(struct platform_device *pdev)
803794
return ret;
804795
}
805796

797+
if (!ulite_uart_driver.state) {
798+
dev_dbg(&pdev->dev, "uartlite: calling uart_register_driver()\n");
799+
ret = uart_register_driver(&ulite_uart_driver);
800+
if (ret < 0) {
801+
dev_err(&pdev->dev, "Failed to register driver\n");
802+
return ret;
803+
}
804+
}
805+
806806
ret = ulite_assign(&pdev->dev, id, res->start, irq, pdata);
807807

808808
clk_disable(pdata->clk);

0 commit comments

Comments
 (0)