tty: serial: uartlite: Support probe deferral
authorAlexander Sverdlin <alexander.sverdlin@nokia.com>
Fri, 27 Nov 2020 10:19:53 +0000 (11:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Dec 2020 15:51:40 +0000 (16:51 +0100)
Give uartlite a chance to be probed when IRQ controller will be finally
available and return potential -EPROBE_DEFER as-is. The condition "<="
has been changed to "<" to follow the recommendation in the header of
platform_get_irq().

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Link: https://lore.kernel.org/r/20201127101953.23700-1-alexander.sverdlin@nokia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/uartlite.c

index 09379db613d8b7f69cab5ffa66d0a90c868cdec2..f42ccc40ffa647c5eb2470220e53f3115e5c8236 100644 (file)
@@ -773,8 +773,8 @@ static int ulite_probe(struct platform_device *pdev)
                return -ENODEV;
 
        irq = platform_get_irq(pdev, 0);
-       if (irq <= 0)
-               return -ENXIO;
+       if (irq < 0)
+               return irq;
 
        pdata->clk = devm_clk_get(&pdev->dev, "s_axi_aclk");
        if (IS_ERR(pdata->clk)) {