aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irqnr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/irqnr.h')
-rw-r--r--include/linux/irqnr.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h
index 86af92e9e84c..ec87b212ff7d 100644
--- a/include/linux/irqnr.h
+++ b/include/linux/irqnr.h
@@ -20,6 +20,7 @@
20 20
21# define for_each_irq_desc_reverse(irq, desc) \ 21# define for_each_irq_desc_reverse(irq, desc) \
22 for (irq = nr_irqs - 1; irq >= 0; irq--) 22 for (irq = nr_irqs - 1; irq >= 0; irq--)
23
23#else /* CONFIG_GENERIC_HARDIRQS */ 24#else /* CONFIG_GENERIC_HARDIRQS */
24 25
25extern int nr_irqs; 26extern int nr_irqs;
@@ -28,13 +29,17 @@ extern struct irq_desc *irq_to_desc(unsigned int irq);
28# define for_each_irq_desc(irq, desc) \ 29# define for_each_irq_desc(irq, desc) \
29 for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \ 30 for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \
30 irq++, desc = irq_to_desc(irq)) \ 31 irq++, desc = irq_to_desc(irq)) \
31 if (desc) 32 if (!desc) \
33 ; \
34 else
32 35
33 36
34# define for_each_irq_desc_reverse(irq, desc) \ 37# define for_each_irq_desc_reverse(irq, desc) \
35 for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; \ 38 for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; \
36 irq--, desc = irq_to_desc(irq)) \ 39 irq--, desc = irq_to_desc(irq)) \
37 if (desc) 40 if (!desc) \
41 ; \
42 else
38 43
39#endif /* CONFIG_GENERIC_HARDIRQS */ 44#endif /* CONFIG_GENERIC_HARDIRQS */
40 45