Commit a630fe34 authored by Lubomir Rintel's avatar Lubomir Rintel Committed by Bartosz Golaszewski

gpio: pxa: Avoid a warning when gpio0 and gpio1 IRQS are not there

Not all platforms use those. Let's use
platform_get_irq_byname_optional() instead platform_get_irq_byname() so
that we avoid a useless warning:

  [    1.359455] pxa-gpio d4019000.gpio: IRQ gpio0 not found
  [    1.359583] pxa-gpio d4019000.gpio: IRQ gpio1 not found
Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
parent bb6d3fb3
...@@ -652,8 +652,8 @@ static int pxa_gpio_probe(struct platform_device *pdev) ...@@ -652,8 +652,8 @@ static int pxa_gpio_probe(struct platform_device *pdev)
if (!pchip->irqdomain) if (!pchip->irqdomain)
return -ENOMEM; return -ENOMEM;
irq0 = platform_get_irq_byname(pdev, "gpio0"); irq0 = platform_get_irq_byname_optional(pdev, "gpio0");
irq1 = platform_get_irq_byname(pdev, "gpio1"); irq1 = platform_get_irq_byname_optional(pdev, "gpio1");
irq_mux = platform_get_irq_byname(pdev, "gpio_mux"); irq_mux = platform_get_irq_byname(pdev, "gpio_mux");
if ((irq0 > 0 && irq1 <= 0) || (irq0 <= 0 && irq1 > 0) if ((irq0 > 0 && irq1 <= 0) || (irq0 <= 0 && irq1 > 0)
|| (irq_mux <= 0)) || (irq_mux <= 0))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment