summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-10-15 15:39:27 +0200
committerIngo Molnar <mingo@elte.hu>2008-10-16 16:53:14 +0200
commit70dd4d992ab324a59cdcd6bedc3f4e729863d514 (patch)
tree338b28c18a60f0e1d4b65de43dfd24c1c5018532
parent3235e936c0cc3589309280b6f59e5096779adae3 (diff)
downloadop-kernel-dev-70dd4d992ab324a59cdcd6bedc3f4e729863d514.zip
op-kernel-dev-70dd4d992ab324a59cdcd6bedc3f4e729863d514.tar.gz
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 5a57df2..58ff4e7 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -15,15 +15,6 @@
#include <asm/ptrace.h>
#include <asm/system.h>
-#ifndef CONFIG_GENERIC_HARDIRQS
-# define for_each_irq_desc(irq, desc) \
- for (irq = 0; irq < nr_irqs; irq++)
-
-# define nr_irqs NR_IRQS
-#else
-extern int nr_irqs;
-#endif
-
/*
* These correspond to the IORESOURCE_IRQ_* defines in
* linux/ioport.h to select the interrupt line behaviour. When
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 93fe9a9..dbe8734 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -11,6 +11,18 @@
#include <linux/smp.h>
+#ifndef CONFIG_GENERIC_HARDIRQS
+# define nr_irqs NR_IRQS
+
+# define for_each_irq_desc(irq, desc) \
+ for (irq = 0; irq < nr_irqs; irq++)
+#else
+extern int nr_irqs;
+
+# define for_each_irq_desc(irq, desc) \
+ for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++)
+#endif
+
#ifndef CONFIG_S390
#include <linux/linkage.h>
@@ -204,11 +216,6 @@ extern struct irq_desc irq_desc[NR_IRQS];
extern struct irq_desc *irq_desc;
#endif
-#ifdef CONFIG_GENERIC_HARDIRQS
-#define for_each_irq_desc(irq, desc) \
- for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc = &irq_desc[irq])
-#endif
-
#else
extern struct irq_desc *sparse_irqs;
OpenPOWER on IntegriCloud