From: Felipe Balbi Date: Mon, 15 Sep 2014 21:15:03 +0000 (-0500) Subject: irqchip: omap-intc: minor improvement to omap_irq_pending() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6bd0f16e322b4572fe1e0ff3b0e78c800c2633b4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Felipe Balbi Signed-off-by: Tony Lindgren --- 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) 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; }