diff options
-rw-r--r-- | arch/arm/plat-omap/gpio.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index cb0c21d384c0..fec7970e564d 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -850,7 +850,8 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, | |||
850 | /* Don't run the handler if it's already running | 850 | /* Don't run the handler if it's already running |
851 | * or was disabled lazely. | 851 | * or was disabled lazely. |
852 | */ | 852 | */ |
853 | if (unlikely((d->disable_depth || d->running))) { | 853 | if (unlikely((d->depth || |
854 | (d->status & IRQ_INPROGRESS)))) { | ||
854 | irq_mask = 1 << | 855 | irq_mask = 1 << |
855 | (gpio_irq - bank->virtual_irq_start); | 856 | (gpio_irq - bank->virtual_irq_start); |
856 | /* The unmasking will be done by | 857 | /* The unmasking will be done by |
@@ -859,22 +860,22 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, | |||
859 | * it's already running. | 860 | * it's already running. |
860 | */ | 861 | */ |
861 | _enable_gpio_irqbank(bank, irq_mask, 0); | 862 | _enable_gpio_irqbank(bank, irq_mask, 0); |
862 | if (!d->disable_depth) { | 863 | if (!d->depth) { |
863 | /* Level triggered interrupts | 864 | /* Level triggered interrupts |
864 | * won't ever be reentered | 865 | * won't ever be reentered |
865 | */ | 866 | */ |
866 | BUG_ON(level_mask & irq_mask); | 867 | BUG_ON(level_mask & irq_mask); |
867 | d->pending = 1; | 868 | d->status |= IRQ_PENDING; |
868 | } | 869 | } |
869 | continue; | 870 | continue; |
870 | } | 871 | } |
871 | d->running = 1; | 872 | |
872 | desc_handle_irq(gpio_irq, d, regs); | 873 | desc_handle_irq(gpio_irq, d, regs); |
873 | d->running = 0; | 874 | |
874 | if (unlikely(d->pending && !d->disable_depth)) { | 875 | if (unlikely((d->status & IRQ_PENDING) && !d->depth)) { |
875 | irq_mask = 1 << | 876 | irq_mask = 1 << |
876 | (gpio_irq - bank->virtual_irq_start); | 877 | (gpio_irq - bank->virtual_irq_start); |
877 | d->pending = 0; | 878 | d->status &= ~IRQ_PENDING; |
878 | _enable_gpio_irqbank(bank, irq_mask, 1); | 879 | _enable_gpio_irqbank(bank, irq_mask, 1); |
879 | retrigger |= irq_mask; | 880 | retrigger |= irq_mask; |
880 | } | 881 | } |