提交 70dd4d99 编写于 作者: T Thomas Gleixner 提交者: Ingo Molnar

genirq: consolidate nr_irqs and for_each_irq_desc()

Move all of those to linux/irq.h where they belong.
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 3235e936
...@@ -15,15 +15,6 @@ ...@@ -15,15 +15,6 @@
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/system.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 * These correspond to the IORESOURCE_IRQ_* defines in
* linux/ioport.h to select the interrupt line behaviour. When * linux/ioport.h to select the interrupt line behaviour. When
......
...@@ -11,6 +11,18 @@ ...@@ -11,6 +11,18 @@
#include <linux/smp.h> #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 #ifndef CONFIG_S390
#include <linux/linkage.h> #include <linux/linkage.h>
...@@ -204,11 +216,6 @@ extern struct irq_desc irq_desc[NR_IRQS]; ...@@ -204,11 +216,6 @@ extern struct irq_desc irq_desc[NR_IRQS];
extern struct irq_desc *irq_desc; extern struct irq_desc *irq_desc;
#endif #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 #else
extern struct irq_desc *sparse_irqs; extern struct irq_desc *sparse_irqs;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册