diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-12-12 05:26:39 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-12 06:28:50 -0500 |
commit | 0ebb26e7a4e2c5337502e98b2221e037fda911b9 (patch) | |
tree | c761f4ed74cf412bd2f9de7a091280797548c5b1 /include/linux/irqnr.h | |
parent | 8a4830f8891be6b4e04809693a24771a4694e0b0 (diff) |
sparse irqs: handle !GENIRQ platforms
Impact: build fix
fix:
In file included from /home/mingo/tip/arch/m68k/amiga/amiints.c:39:
/home/mingo/tip/include/linux/interrupt.h:21: error: expected identifier or '('
/home/mingo/tip/arch/m68k/amiga/amiints.c: In function 'amiga_init_IRQ':
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/irqnr.h')
-rw-r--r-- | include/linux/irqnr.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index 13754f813589..95d2b74641f5 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h | |||
@@ -1,6 +1,11 @@ | |||
1 | #ifndef _LINUX_IRQNR_H | 1 | #ifndef _LINUX_IRQNR_H |
2 | #define _LINUX_IRQNR_H | 2 | #define _LINUX_IRQNR_H |
3 | 3 | ||
4 | /* | ||
5 | * Generic irq_desc iterators: | ||
6 | */ | ||
7 | #ifdef __KERNEL__ | ||
8 | |||
4 | #ifndef CONFIG_GENERIC_HARDIRQS | 9 | #ifndef CONFIG_GENERIC_HARDIRQS |
5 | #include <asm/irq.h> | 10 | #include <asm/irq.h> |
6 | # define nr_irqs NR_IRQS | 11 | # define nr_irqs NR_IRQS |
@@ -11,10 +16,12 @@ | |||
11 | # define for_each_irq_desc_reverse(irq, desc) \ | 16 | # define for_each_irq_desc_reverse(irq, desc) \ |
12 | for (irq = nr_irqs - 1; irq >= 0; irq--) | 17 | for (irq = nr_irqs - 1; irq >= 0; irq--) |
13 | #else | 18 | #else |
19 | |||
20 | extern int nr_irqs; | ||
21 | |||
14 | #ifndef CONFIG_SPARSE_IRQ | 22 | #ifndef CONFIG_SPARSE_IRQ |
15 | 23 | ||
16 | struct irq_desc; | 24 | struct irq_desc; |
17 | extern int nr_irqs; | ||
18 | # define for_each_irq_desc(irq, desc) \ | 25 | # define for_each_irq_desc(irq, desc) \ |
19 | for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++) | 26 | for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++) |
20 | # define for_each_irq_desc_reverse(irq, desc) \ | 27 | # define for_each_irq_desc_reverse(irq, desc) \ |
@@ -26,4 +33,6 @@ extern int nr_irqs; | |||
26 | #define for_each_irq_nr(irq) \ | 33 | #define for_each_irq_nr(irq) \ |
27 | for (irq = 0; irq < nr_irqs; irq++) | 34 | for (irq = 0; irq < nr_irqs; irq++) |
28 | 35 | ||
36 | #endif /* __KERNEL__ */ | ||
37 | |||
29 | #endif | 38 | #endif |