Skip to content

Commit 22cc422

Browse files
andy-shevlinusw
authored andcommitted
gpio: wcove: Request IRQ after all initialisation done
There is logically better to request IRQ when we initialise all structures. Align the driver with the rest on the same matter. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent a1cdaa6 commit 22cc422

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/gpio/gpio-wcove.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -449,13 +449,6 @@ static int wcove_gpio_probe(struct platform_device *pdev)
449449
return virq;
450450
}
451451

452-
ret = devm_request_threaded_irq(dev, virq, NULL,
453-
wcove_gpio_irq_handler, IRQF_ONESHOT, pdev->name, wg);
454-
if (ret) {
455-
dev_err(dev, "Failed to request irq %d\n", virq);
456-
return ret;
457-
}
458-
459452
girq = &wg->chip.irq;
460453
girq->chip = &wcove_irqchip;
461454
/* This will let us handle the parent IRQ in the driver */
@@ -466,6 +459,13 @@ static int wcove_gpio_probe(struct platform_device *pdev)
466459
girq->handler = handle_simple_irq;
467460
girq->threaded = true;
468461

462+
ret = devm_request_threaded_irq(dev, virq, NULL, wcove_gpio_irq_handler,
463+
IRQF_ONESHOT, pdev->name, wg);
464+
if (ret) {
465+
dev_err(dev, "Failed to request irq %d\n", virq);
466+
return ret;
467+
}
468+
469469
ret = devm_gpiochip_add_data(dev, &wg->chip, wg);
470470
if (ret) {
471471
dev_err(dev, "Failed to add gpiochip: %d\n", ret);

0 commit comments

Comments
 (0)