Skip to content

Commit

Permalink
irqchip: omap-intc: minor improvement to omap_irq_pending()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Balbi authored and Tony Lindgren committed Sep 16, 2014
1 parent 8598066 commit 6bd0f16
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/irqchip/irq-omap-intc.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,10 @@ static void __init omap_irq_soft_reset(void)

int omap_irq_pending(void)
{
int irq;
int i;

for (irq = 0; irq < omap_nr_irqs; irq += 32)
if (intc_readl(INTC_PENDING_IRQ0 +
((irq >> 5) << 5)))
for (i = 0; i < omap_nr_pending; i++)
if (intc_readl(INTC_PENDING_IRQ0 + (0x20 * i)))
return 1;
return 0;
}
Expand Down

0 comments on commit 6bd0f16

Please sign in to comment.