aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-09-15 17:15:03 -0400
committerTony Lindgren <tony@atomide.com>2014-09-16 17:44:59 -0400
commit6bd0f16e322b4572fe1e0ff3b0e78c800c2633b4 (patch)
treee1d1b6aaebb1cf993b26339484a94c4c1cd67b4a /drivers/irqchip
parent8598066cddd186809c4edf5aae5f018c00079e8c (diff)
irqchip: omap-intc: minor improvement to omap_irq_pending()
We already hold the number of Pending registers in omap_nr_pending. Let's use that instead. Acked-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/irqchip')
-rw-r--r--drivers/irqchip/irq-omap-intc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
index 1478f1a3c400..2933760f95aa 100644
--- a/drivers/irqchip/irq-omap-intc.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -174,11 +174,10 @@ static void __init omap_irq_soft_reset(void)
174 174
175int omap_irq_pending(void) 175int omap_irq_pending(void)
176{ 176{
177 int irq; 177 int i;
178 178
179 for (irq = 0; irq < omap_nr_irqs; irq += 32) 179 for (i = 0; i < omap_nr_pending; i++)
180 if (intc_readl(INTC_PENDING_IRQ0 + 180 if (intc_readl(INTC_PENDING_IRQ0 + (0x20 * i)))
181 ((irq >> 5) << 5)))
182 return 1; 181 return 1;
183 return 0; 182 return 0;
184} 183}