diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-05 08:34:42 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-05 08:53:30 -0500 |
commit | be92d7af38fb8a91f8575ab2272e00f2e51667ff (patch) | |
tree | 1ff330ca92cf3b7ccd95e10dc9704a6b26e800d7 /include/linux/irqnr.h | |
parent | fe0bdec68b77020281dc814805edfe594ae89e0f (diff) |
genirq: provide irq_to_desc() to non-genirq architectures too
Impact: build fix on non-genirq architectures
Sam Ravnborg reported this build failure on sparc32 allmodconfig,
the GPIO drivers assume the presence of irq_to_desc():
drivers/gpio/gpiolib.c: In function `gpiolib_dbg_show':
drivers/gpio/gpiolib.c:1146: error: implicit declaration of function 'irq_to_desc'
Add it in the !genirq case too.
Reported-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'include/linux/irqnr.h')
-rw-r--r-- | include/linux/irqnr.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index 5504a5c97836..86af92e9e84c 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h | |||
@@ -8,7 +8,12 @@ | |||
8 | 8 | ||
9 | #ifndef CONFIG_GENERIC_HARDIRQS | 9 | #ifndef CONFIG_GENERIC_HARDIRQS |
10 | #include <asm/irq.h> | 10 | #include <asm/irq.h> |
11 | # define nr_irqs NR_IRQS | 11 | |
12 | /* | ||
13 | * Wrappers for non-genirq architectures: | ||
14 | */ | ||
15 | #define nr_irqs NR_IRQS | ||
16 | #define irq_to_desc(irq) (&irq_desc[irq]) | ||
12 | 17 | ||
13 | # define for_each_irq_desc(irq, desc) \ | 18 | # define for_each_irq_desc(irq, desc) \ |
14 | for (irq = 0; irq < nr_irqs; irq++) | 19 | for (irq = 0; irq < nr_irqs; irq++) |