arm: davinci: Fix fallout from generic irq chip conversion
authorThomas Gleixner <tglx@linutronix.de>
Mon, 6 Jun 2011 09:51:43 +0000 (11:51 +0200)
committerSekhar Nori <nsekhar@ti.com>
Wed, 8 Jun 2011 09:03:52 +0000 (14:33 +0530)
The code which does the chained handler setup was overwriting
chip_data.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Holger Hans Peter Freyther <holger@freyther.de>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arch/arm/mach-davinci/gpio.c

index a0b838894ac99b27daaf413fbfbd8f78ae842066..e7221398e5af9c751d1dc8f85c1d294b2afb0f9b 100644 (file)
@@ -252,9 +252,11 @@ static struct irq_chip gpio_irqchip = {
 static void
 gpio_irq_handler(unsigned irq, struct irq_desc *desc)
 {
-       struct davinci_gpio_regs __iomem *g = irq2regs(irq);
+       struct davinci_gpio_regs __iomem *g;
        u32 mask = 0xffff;
 
+       g = (__force struct davinci_gpio_regs __iomem *) irq_desc_get_handler_data(desc);
+
        /* we only care about one bank */
        if (irq & 1)
                mask <<= 16;
@@ -422,8 +424,7 @@ static int __init davinci_gpio_irq_setup(void)
 
                /* set up all irqs in this bank */
                irq_set_chained_handler(bank_irq, gpio_irq_handler);
-               irq_set_chip_data(bank_irq, (__force void *)g);
-               irq_set_handler_data(bank_irq, (void *)irq);
+               irq_set_handler_data(bank_irq, (__force void *)g);
 
                for (i = 0; i < 16 && gpio < ngpio; i++, irq++, gpio++) {
                        irq_set_chip(irq, &gpio_irqchip);