mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
gpio: tqmx86: really make IRQ optional
The tqmx86 MFD driver was passing IRQ 0 for "no IRQ" in the past. This
causes warnings with newer kernels.
Prepare the gpio-tqmx86 driver for the fixed MFD driver by handling a
missing IRQ properly.
Fixes: b868db94a6
("gpio: tqmx86: Add GPIO from for this IO controller")
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
parent
ec7099fdea
commit
9b87f43537
1 changed files with 3 additions and 3 deletions
|
@ -238,8 +238,8 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
int ret, irq;
|
int ret, irq;
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq_optional(pdev, 0);
|
||||||
if (irq < 0)
|
if (irq < 0 && irq != -ENXIO)
|
||||||
return irq;
|
return irq;
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_IO, 0);
|
res = platform_get_resource(pdev, IORESOURCE_IO, 0);
|
||||||
|
@ -278,7 +278,7 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
pm_runtime_enable(&pdev->dev);
|
pm_runtime_enable(&pdev->dev);
|
||||||
|
|
||||||
if (irq) {
|
if (irq > 0) {
|
||||||
struct irq_chip *irq_chip = &gpio->irq_chip;
|
struct irq_chip *irq_chip = &gpio->irq_chip;
|
||||||
u8 irq_status;
|
u8 irq_status;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue