From: Chris Packham Date: Fri, 13 Mar 2020 03:42:44 +0000 (+1300) Subject: gpio: mvebu: avoid error message for optional IRQ X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=525b0858ff;p=openwrt%2Fstaging%2Fblogic.git gpio: mvebu: avoid error message for optional IRQ platform_get_irq() will generate an error message if the requested irq is not present mvebu-gpio f1010140.gpio: IRQ index 3 not found use platform_get_irq_optional() to avoid the error message being generated. Signed-off-by: Chris Packham Acked-by: Uwe Kleine-König Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index d2b999c7987f..3c9f4fb3d5a2 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c @@ -1247,7 +1247,7 @@ static int mvebu_gpio_probe(struct platform_device *pdev) * pins. */ for (i = 0; i < 4; i++) { - int irq = platform_get_irq(pdev, i); + int irq = platform_get_irq_optional(pdev, i); if (irq < 0) continue;