Commit 6bd0f16e322b4572fe1e0ff3b0e78c800c2633b4
Committed by
Tony Lindgren
1 parent
8598066cdd
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>
Showing 1 changed file with 3 additions and 4 deletions Side-by-side Diff
drivers/irqchip/irq-omap-intc.c
... | ... | @@ -174,11 +174,10 @@ |
174 | 174 | |
175 | 175 | int omap_irq_pending(void) |
176 | 176 | { |
177 | - int irq; | |
177 | + int i; | |
178 | 178 | |
179 | - for (irq = 0; irq < omap_nr_irqs; irq += 32) | |
180 | - if (intc_readl(INTC_PENDING_IRQ0 + | |
181 | - ((irq >> 5) << 5))) | |
179 | + for (i = 0; i < omap_nr_pending; i++) | |
180 | + if (intc_readl(INTC_PENDING_IRQ0 + (0x20 * i))) | |
182 | 181 | return 1; |
183 | 182 | return 0; |
184 | 183 | } |