pinctrl: nomadik: Simplify interrupt handler
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 14 Oct 2019 11:11:54 +0000 (13:11 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 16 Oct 2019 13:56:19 +0000 (15:56 +0200)
The inner interrupt handler was for the latent IRQ handling,
and that will never be used, inline the unnecessary function.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20191014111154.9731-3-linus.walleij@linaro.org
drivers/pinctrl/nomadik/pinctrl-nomadik.c

index b7992da..95f864d 100644 (file)
@@ -799,13 +799,19 @@ static void nmk_gpio_irq_shutdown(struct irq_data *d)
        clk_disable(nmk_chip->clk);
 }
 
-static void __nmk_gpio_irq_handler(struct irq_desc *desc, u32 status)
+static void nmk_gpio_irq_handler(struct irq_desc *desc)
 {
        struct irq_chip *host_chip = irq_desc_get_chip(desc);
        struct gpio_chip *chip = irq_desc_get_handler_data(desc);
+       struct nmk_gpio_chip *nmk_chip = gpiochip_get_data(chip);
+       u32 status;
 
        chained_irq_enter(host_chip, desc);
 
+       clk_enable(nmk_chip->clk);
+       status = readl(nmk_chip->addr + NMK_GPIO_IS);
+       clk_disable(nmk_chip->clk);
+
        while (status) {
                int bit = __ffs(status);
 
@@ -816,19 +822,6 @@ static void __nmk_gpio_irq_handler(struct irq_desc *desc, u32 status)
        chained_irq_exit(host_chip, desc);
 }
 
-static void nmk_gpio_irq_handler(struct irq_desc *desc)
-{
-       struct gpio_chip *chip = irq_desc_get_handler_data(desc);
-       struct nmk_gpio_chip *nmk_chip = gpiochip_get_data(chip);
-       u32 status;
-
-       clk_enable(nmk_chip->clk);
-       status = readl(nmk_chip->addr + NMK_GPIO_IS);
-       clk_disable(nmk_chip->clk);
-
-       __nmk_gpio_irq_handler(desc, status);
-}
-
 /* I/O Functions */
 
 static int nmk_gpio_get_dir(struct gpio_chip *chip, unsigned offset)