2020-01-10 03:58:09

by Rayagonda Kokatanur

[permalink] [raw]
Subject: [PATCH v1 1/1] pinctrl: iproc: Use platform_get_irq_optional() to avoid error message

Use platform_get_irq_optional() instead of platform_get_irq() to avoid
below error message during probe:

[ 0.589121] iproc-gpio 66424800.gpio: IRQ index 0 not found

Signed-off-by: Rayagonda Kokatanur <[email protected]>
---
drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
index 831a9318c384..0d2bdb818d41 100644
--- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
+++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
@@ -843,7 +843,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)
"gpio-ranges");

/* optional GPIO interrupt support */
- irq = platform_get_irq(pdev, 0);
+ irq = platform_get_irq_optional(pdev, 0);
if (irq > 0) {
struct irq_chip *irqc;
struct gpio_irq_chip *girq;
--
2.17.1


2020-01-12 20:03:29

by Chris Packham

[permalink] [raw]
Subject: Re: [PATCH v1 1/1] pinctrl: iproc: Use platform_get_irq_optional() to avoid error message

On Fri, 2020-01-10 at 09:25 +0530, Rayagonda Kokatanur wrote:
> Use platform_get_irq_optional() instead of platform_get_irq() to avoid
> below error message during probe:
>
> [ 0.589121] iproc-gpio 66424800.gpio: IRQ index 0 not found
>
> Signed-off-by: Rayagonda Kokatanur <[email protected]>

Reviewed-by: Chris Packham <[email protected]>

> ---
> drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
> index 831a9318c384..0d2bdb818d41 100644
> --- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
> +++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
> @@ -843,7 +843,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)
> "gpio-ranges");
>
> /* optional GPIO interrupt support */
> - irq = platform_get_irq(pdev, 0);
> + irq = platform_get_irq_optional(pdev, 0);
> if (irq > 0) {
> struct irq_chip *irqc;
> struct gpio_irq_chip *girq;

2020-01-15 12:48:11

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v1 1/1] pinctrl: iproc: Use platform_get_irq_optional() to avoid error message

On Fri, Jan 10, 2020 at 4:55 AM Rayagonda Kokatanur
<[email protected]> wrote:

> Use platform_get_irq_optional() instead of platform_get_irq() to avoid
> below error message during probe:
>
> [ 0.589121] iproc-gpio 66424800.gpio: IRQ index 0 not found
>
> Signed-off-by: Rayagonda Kokatanur <[email protected]>

Patch applied with Chris' ACK.

Yours,
Linus Walleij