Commit 22cc4220 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Walleij

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200728125504.27786-3-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent a1cdaa64
...@@ -449,13 +449,6 @@ static int wcove_gpio_probe(struct platform_device *pdev) ...@@ -449,13 +449,6 @@ static int wcove_gpio_probe(struct platform_device *pdev)
return virq; return virq;
} }
ret = devm_request_threaded_irq(dev, virq, NULL,
wcove_gpio_irq_handler, IRQF_ONESHOT, pdev->name, wg);
if (ret) {
dev_err(dev, "Failed to request irq %d\n", virq);
return ret;
}
girq = &wg->chip.irq; girq = &wg->chip.irq;
girq->chip = &wcove_irqchip; girq->chip = &wcove_irqchip;
/* This will let us handle the parent IRQ in the driver */ /* This will let us handle the parent IRQ in the driver */
...@@ -466,6 +459,13 @@ static int wcove_gpio_probe(struct platform_device *pdev) ...@@ -466,6 +459,13 @@ static int wcove_gpio_probe(struct platform_device *pdev)
girq->handler = handle_simple_irq; girq->handler = handle_simple_irq;
girq->threaded = true; girq->threaded = true;
ret = devm_request_threaded_irq(dev, virq, NULL, wcove_gpio_irq_handler,
IRQF_ONESHOT, pdev->name, wg);
if (ret) {
dev_err(dev, "Failed to request irq %d\n", virq);
return ret;
}
ret = devm_gpiochip_add_data(dev, &wg->chip, wg); ret = devm_gpiochip_add_data(dev, &wg->chip, wg);
if (ret) { if (ret) {
dev_err(dev, "Failed to add gpiochip: %d\n", ret); dev_err(dev, "Failed to add gpiochip: %d\n", ret);
......
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