aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irqnr.h
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2008-12-08 17:06:17 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-08 22:16:54 -0500
commit240d367b4e6c6e3c5075e034db14dba60a6f5fa7 (patch)
tree9750876ae9afcfa265fc15185134d5aea13eb530 /include/linux/irqnr.h
parent50dd94e017ec39f85c26b6c10ed9fb2d7a7d8042 (diff)
sparseirq: fix Alpha build failure
Impact: build fix on Alpha -tip testing found this build failure on the Alpha defconfig: /home/mingo/tip/fs/proc/stat.c: In function 'show_stat': /home/mingo/tip/fs/proc/stat.c:48: error: implicit declaration of function 'for_each_irq_desc' /home/mingo/tip/fs/proc/stat.c:48: error: expected ';' before '{' token can not use irq_desc() in stat.c on older architectures. Signed-off-by: Yinghai Lu <yinghai@kernel.orgg> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/irqnr.h')
-rw-r--r--include/linux/irqnr.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h
index 7a299e989f8b..13754f813589 100644
--- a/include/linux/irqnr.h
+++ b/include/linux/irqnr.h
@@ -8,9 +8,22 @@
8# define for_each_irq_desc(irq, desc) \ 8# define for_each_irq_desc(irq, desc) \
9 for (irq = 0; irq < nr_irqs; irq++) 9 for (irq = 0; irq < nr_irqs; irq++)
10 10
11static inline early_sparse_irq_init(void) 11# define for_each_irq_desc_reverse(irq, desc) \
12{ 12 for (irq = nr_irqs - 1; irq >= 0; irq--)
13} 13#else
14#ifndef CONFIG_SPARSE_IRQ
15
16struct irq_desc;
17extern int nr_irqs;
18# define for_each_irq_desc(irq, desc) \
19 for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++)
20# define for_each_irq_desc_reverse(irq, desc) \
21 for (irq = nr_irqs - 1, desc = irq_desc + (nr_irqs - 1); \
22 irq >= 0; irq--, desc--)
14#endif 23#endif
24#endif
25
26#define for_each_irq_nr(irq) \
27 for (irq = 0; irq < nr_irqs; irq++)
15 28
16#endif 29#endif