OSDN Git Service

gpio: altera: change to platform_get_irq_optional to avoid false-positive error
authorOoi, Joyce <joyce.ooi@intel.com>
Wed, 8 Jan 2020 16:16:20 +0000 (00:16 +0800)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Thu, 9 Jan 2020 09:35:05 +0000 (10:35 +0100)
This patch switches to platform_get_irq_optional() from
platform_get_irq() as it causes a false-positive error such as 'IRQ
index 0 not found' when IRQ is not used. The IRQ usage is optional in
this gpio-altera driver, so the error log is undesirable.

Signed-off-by: Ooi, Joyce <joyce.ooi@intel.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpio-altera.c

index 9f2e6b0..cc4ba71 100644 (file)
@@ -266,7 +266,7 @@ static int altera_gpio_probe(struct platform_device *pdev)
        altera_gc->mmchip.gc.owner              = THIS_MODULE;
        altera_gc->mmchip.gc.parent             = &pdev->dev;
 
-       altera_gc->mapped_irq = platform_get_irq(pdev, 0);
+       altera_gc->mapped_irq = platform_get_irq_optional(pdev, 0);
 
        if (altera_gc->mapped_irq < 0)
                goto skip_irq;