Skip to content

Commit 9b87f43

Browse files
tq-schiffermbrgl
authored andcommitted
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: b868db9 ("gpio: tqmx86: Add GPIO from for this IO controller") Signed-off-by: Matthias Schiffer <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent ec7099f commit 9b87f43

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpio/gpio-tqmx86.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
238238
struct resource *res;
239239
int ret, irq;
240240

241-
irq = platform_get_irq(pdev, 0);
242-
if (irq < 0)
241+
irq = platform_get_irq_optional(pdev, 0);
242+
if (irq < 0 && irq != -ENXIO)
243243
return irq;
244244

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

279279
pm_runtime_enable(&pdev->dev);
280280

281-
if (irq) {
281+
if (irq > 0) {
282282
struct irq_chip *irq_chip = &gpio->irq_chip;
283283
u8 irq_status;
284284

0 commit comments

Comments
 (0)