ARM: omap: update GPIO chained IRQ handler to use entry/exit functions
authorWill Deacon <will.deacon@arm.com>
Mon, 21 Feb 2011 13:46:08 +0000 (13:46 +0000)
committerWill Deacon <will.deacon@arm.com>
Wed, 11 May 2011 15:04:15 +0000 (16:04 +0100)
This patch updates the OMAP gpio chained IRQ handler to use the chained
IRQ enter/exit functions in order to function correctly on primary
controllers with different methods of flow control.

Cc: Colin Cross <ccross@google.com>
Cc: Tony Lindgren <tony@atomide.com>
Tested-and-acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/plat-omap/gpio.c

index d2adcdd..a2478eb 100644 (file)
@@ -1137,8 +1137,9 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
        struct gpio_bank *bank;
        u32 retrigger = 0;
        int unmasked = 0;
+       struct irq_chip *chip = irq_desc_get_chip(desc);
 
-       desc->irq_data.chip->irq_ack(&desc->irq_data);
+       chained_irq_enter(chip, desc);
 
        bank = irq_get_handler_data(irq);
 #ifdef CONFIG_ARCH_OMAP1
@@ -1195,7 +1196,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
                configured, we could unmask GPIO bank interrupt immediately */
                if (!level_mask && !unmasked) {
                        unmasked = 1;
-                       desc->irq_data.chip->irq_unmask(&desc->irq_data);
+                       chained_irq_exit(chip, desc);
                }
 
                isr |= retrigger;
@@ -1231,7 +1232,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
        interrupt */
 exit:
        if (!unmasked)
-               desc->irq_data.chip->irq_unmask(&desc->irq_data);
+               chained_irq_exit(chip, desc);
 }
 
 static void gpio_irq_shutdown(struct irq_data *d)