]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
genirq: consolidate nr_irqs and for_each_irq_desc()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 15 Oct 2008 13:39:27 +0000 (15:39 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 16 Oct 2008 14:53:14 +0000 (16:53 +0200)
Move all of those to linux/irq.h where they belong.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/interrupt.h
include/linux/irq.h

index 5a57df2ee922451bff1ca32fedcf8e9aca4c9ebf..58ff4e74b2f362bcc2078e76e9c5d10bdfba1f83 100644 (file)
 #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
index 93fe9a943e714c14802869b3a769f24ca4aed2bd..dbe8734ae86ceb421a284793c8b4515ff894476f 100644 (file)
 
 #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;