]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
platform/chrome: cros_ec_lpc: Use platform_get_irq_optional() for optional IRQs
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>
Fri, 29 Nov 2019 10:22:54 +0000 (11:22 +0100)
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>
Tue, 10 Dec 2019 09:14:02 +0000 (10:14 +0100)
As platform_get_irq() now prints an error when the interrupt does not
exist, use platform_get_irq_optional() to get the IRQ which is optional
to avoid below error message during probe:

  [    5.113502] cros_ec_lpcs GOOG0004:00: IRQ index 0 not found

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
drivers/platform/chrome/cros_ec_lpc.c

index dccf479c66251a1937852f3351fa5f06b6120d9a..ffdea7c347f2b2dbf60374bc29e109e16dc30aa9 100644 (file)
@@ -396,7 +396,7 @@ static int cros_ec_lpc_probe(struct platform_device *pdev)
         * Some boards do not have an IRQ allotted for cros_ec_lpc,
         * which makes ENXIO an expected (and safe) scenario.
         */
-       irq = platform_get_irq(pdev, 0);
+       irq = platform_get_irq_optional(pdev, 0);
        if (irq > 0)
                ec_dev->irq = irq;
        else if (irq != -ENXIO) {