Skip to content

Commit

Permalink
gpio: tqmx86: really make IRQ optional
Browse files Browse the repository at this point in the history
[ Upstream commit 9b87f43 ]

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: b868db9 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
schiffermtq authored and gregkh committed Aug 12, 2021
1 parent be4b1c0 commit 84a55bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpio/gpio-tqmx86.c
Expand Up @@ -238,8 +238,8 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
struct resource *res;
int ret, irq;

irq = platform_get_irq(pdev, 0);
if (irq < 0)
irq = platform_get_irq_optional(pdev, 0);
if (irq < 0 && irq != -ENXIO)
return irq;

res = platform_get_resource(pdev, IORESOURCE_IO, 0);
Expand Down Expand Up @@ -278,7 +278,7 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)

pm_runtime_enable(&pdev->dev);

if (irq) {
if (irq > 0) {
struct irq_chip *irq_chip = &gpio->irq_chip;
u8 irq_status;

Expand Down

0 comments on commit 84a55bb

Please sign in to comment.