aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-10-15 09:39:27 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:53:14 -0400
commit70dd4d992ab324a59cdcd6bedc3f4e729863d514 (patch)
tree338b28c18a60f0e1d4b65de43dfd24c1c5018532
parent3235e936c0cc3589309280b6f59e5096779adae3 (diff)
genirq: consolidate nr_irqs and for_each_irq_desc()
Move all of those to linux/irq.h where they belong. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--include/linux/interrupt.h9
-rw-r--r--include/linux/irq.h17
2 files changed, 12 insertions, 14 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 5a57df2ee922..58ff4e74b2f3 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -15,15 +15,6 @@
15#include <asm/ptrace.h> 15#include <asm/ptrace.h>
16#include <asm/system.h> 16#include <asm/system.h>
17 17
18#ifndef CONFIG_GENERIC_HARDIRQS
19# define for_each_irq_desc(irq, desc) \
20 for (irq = 0; irq < nr_irqs; irq++)
21
22# define nr_irqs NR_IRQS
23#else
24extern int nr_irqs;
25#endif
26
27/* 18/*
28 * These correspond to the IORESOURCE_IRQ_* defines in 19 * These correspond to the IORESOURCE_IRQ_* defines in
29 * linux/ioport.h to select the interrupt line behaviour. When 20 * linux/ioport.h to select the interrupt line behaviour. When
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 93fe9a943e71..dbe8734ae86c 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -11,6 +11,18 @@
11 11
12#include <linux/smp.h> 12#include <linux/smp.h>
13 13
14#ifndef CONFIG_GENERIC_HARDIRQS
15# define nr_irqs NR_IRQS
16
17# define for_each_irq_desc(irq, desc) \
18 for (irq = 0; irq < nr_irqs; irq++)
19#else
20extern int nr_irqs;
21
22# define for_each_irq_desc(irq, desc) \
23 for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++)
24#endif
25
14#ifndef CONFIG_S390 26#ifndef CONFIG_S390
15 27
16#include <linux/linkage.h> 28#include <linux/linkage.h>
@@ -204,11 +216,6 @@ extern struct irq_desc irq_desc[NR_IRQS];
204extern struct irq_desc *irq_desc; 216extern struct irq_desc *irq_desc;
205#endif 217#endif
206 218
207#ifdef CONFIG_GENERIC_HARDIRQS
208#define for_each_irq_desc(irq, desc) \
209 for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc = &irq_desc[irq])
210#endif
211
212#else 219#else
213 220
214extern struct irq_desc *sparse_irqs; 221extern struct irq_desc *sparse_irqs;