[PATCH v1 3/3] gpio: wcove: Request IRQ after all initialisation done

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
 drivers/gpio/gpio-wcove.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpio/gpio-wcove.c b/drivers/gpio/gpio-wcove.c
index 135645096575..b5fbba5a783a 100644
--- a/drivers/gpio/gpio-wcove.c
+++ b/drivers/gpio/gpio-wcove.c
@@ -449,13 +449,6 @@ static int wcove_gpio_probe(struct platform_device *pdev)
 		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->chip = &wcove_irqchip;
 	/* This will let us handle the parent IRQ in the driver */
@@ -466,6 +459,13 @@ static int wcove_gpio_probe(struct platform_device *pdev)
 	girq->handler = handle_simple_irq;
 	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);
 	if (ret) {
 		dev_err(dev, "Failed to add gpiochip: %d\n", ret);
-- 
2.27.0




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux