summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/irq.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index c9ffef7..9de16ca 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -202,9 +202,16 @@ extern struct irq_desc irq_desc[NR_IRQS];
extern struct irq_desc *irq_desc;
#endif
+#ifdef CONFIG_GENERIC_HARDIRQS
+#define for_each_irq_desc(irq, desc) \
+ for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc = &irq_desc[irq])
+#endif
+
#else
extern struct irq_desc *sparse_irqs;
+#define for_each_irq_desc(irqX, desc) \
+ for (desc = sparse_irqs, irqX = desc->irq; desc && irqX != -1U; desc = desc->next, irqX = desc ? desc->irq : -1U)
#endif
OpenPOWER on IntegriCloud