diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-08-19 23:49:47 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-16 10:52:05 -0400 |
commit | 85c0f90978bf50596dbd23854648020f1f9b5bfd (patch) | |
tree | f66c598bb37b925dd6c74e4ce1fb06345c742c01 /kernel/irq/chip.c | |
parent | 6da55c3e8da88e8a7cb6452160776ad6706798ad (diff) |
irq: introduce nr_irqs
at this point nr_irqs is equal NR_IRQS
convert a few easy users from NR_IRQS to dynamic nr_irqs.
v2: according to Eric, we need to take care of arch without generic_hardirqs
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r-- | kernel/irq/chip.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 5203a599d211..bba66e098703 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -27,7 +27,7 @@ void dynamic_irq_init(unsigned int irq) | |||
27 | struct irq_desc *desc; | 27 | struct irq_desc *desc; |
28 | unsigned long flags; | 28 | unsigned long flags; |
29 | 29 | ||
30 | if (irq >= NR_IRQS) { | 30 | if (irq >= nr_irqs) { |
31 | WARN(1, KERN_ERR "Trying to initialize invalid IRQ%d\n", irq); | 31 | WARN(1, KERN_ERR "Trying to initialize invalid IRQ%d\n", irq); |
32 | return; | 32 | return; |
33 | } | 33 | } |
@@ -60,7 +60,7 @@ void dynamic_irq_cleanup(unsigned int irq) | |||
60 | struct irq_desc *desc; | 60 | struct irq_desc *desc; |
61 | unsigned long flags; | 61 | unsigned long flags; |
62 | 62 | ||
63 | if (irq >= NR_IRQS) { | 63 | if (irq >= nr_irqs) { |
64 | WARN(1, KERN_ERR "Trying to cleanup invalid IRQ%d\n", irq); | 64 | WARN(1, KERN_ERR "Trying to cleanup invalid IRQ%d\n", irq); |
65 | return; | 65 | return; |
66 | } | 66 | } |
@@ -92,7 +92,7 @@ int set_irq_chip(unsigned int irq, struct irq_chip *chip) | |||
92 | struct irq_desc *desc; | 92 | struct irq_desc *desc; |
93 | unsigned long flags; | 93 | unsigned long flags; |
94 | 94 | ||
95 | if (irq >= NR_IRQS) { | 95 | if (irq >= nr_irqs) { |
96 | WARN(1, KERN_ERR "Trying to install chip for IRQ%d\n", irq); | 96 | WARN(1, KERN_ERR "Trying to install chip for IRQ%d\n", irq); |
97 | return -EINVAL; | 97 | return -EINVAL; |
98 | } | 98 | } |
@@ -121,7 +121,7 @@ int set_irq_type(unsigned int irq, unsigned int type) | |||
121 | unsigned long flags; | 121 | unsigned long flags; |
122 | int ret = -ENXIO; | 122 | int ret = -ENXIO; |
123 | 123 | ||
124 | if (irq >= NR_IRQS) { | 124 | if (irq >= nr_irqs) { |
125 | printk(KERN_ERR "Trying to set irq type for IRQ%d\n", irq); | 125 | printk(KERN_ERR "Trying to set irq type for IRQ%d\n", irq); |
126 | return -ENODEV; | 126 | return -ENODEV; |
127 | } | 127 | } |
@@ -149,7 +149,7 @@ int set_irq_data(unsigned int irq, void *data) | |||
149 | struct irq_desc *desc; | 149 | struct irq_desc *desc; |
150 | unsigned long flags; | 150 | unsigned long flags; |
151 | 151 | ||
152 | if (irq >= NR_IRQS) { | 152 | if (irq >= nr_irqs) { |
153 | printk(KERN_ERR | 153 | printk(KERN_ERR |
154 | "Trying to install controller data for IRQ%d\n", irq); | 154 | "Trying to install controller data for IRQ%d\n", irq); |
155 | return -EINVAL; | 155 | return -EINVAL; |
@@ -175,7 +175,7 @@ int set_irq_msi(unsigned int irq, struct msi_desc *entry) | |||
175 | struct irq_desc *desc; | 175 | struct irq_desc *desc; |
176 | unsigned long flags; | 176 | unsigned long flags; |
177 | 177 | ||
178 | if (irq >= NR_IRQS) { | 178 | if (irq >= nr_irqs) { |
179 | printk(KERN_ERR | 179 | printk(KERN_ERR |
180 | "Trying to install msi data for IRQ%d\n", irq); | 180 | "Trying to install msi data for IRQ%d\n", irq); |
181 | return -EINVAL; | 181 | return -EINVAL; |
@@ -201,7 +201,7 @@ int set_irq_chip_data(unsigned int irq, void *data) | |||
201 | struct irq_desc *desc = irq_desc + irq; | 201 | struct irq_desc *desc = irq_desc + irq; |
202 | unsigned long flags; | 202 | unsigned long flags; |
203 | 203 | ||
204 | if (irq >= NR_IRQS || !desc->chip) { | 204 | if (irq >= nr_irqs || !desc->chip) { |
205 | printk(KERN_ERR "BUG: bad set_irq_chip_data(IRQ#%d)\n", irq); | 205 | printk(KERN_ERR "BUG: bad set_irq_chip_data(IRQ#%d)\n", irq); |
206 | return -EINVAL; | 206 | return -EINVAL; |
207 | } | 207 | } |
@@ -545,7 +545,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | |||
545 | struct irq_desc *desc; | 545 | struct irq_desc *desc; |
546 | unsigned long flags; | 546 | unsigned long flags; |
547 | 547 | ||
548 | if (irq >= NR_IRQS) { | 548 | if (irq >= nr_irqs) { |
549 | printk(KERN_ERR | 549 | printk(KERN_ERR |
550 | "Trying to install type control for IRQ%d\n", irq); | 550 | "Trying to install type control for IRQ%d\n", irq); |
551 | return; | 551 | return; |
@@ -610,7 +610,7 @@ void __init set_irq_noprobe(unsigned int irq) | |||
610 | struct irq_desc *desc; | 610 | struct irq_desc *desc; |
611 | unsigned long flags; | 611 | unsigned long flags; |
612 | 612 | ||
613 | if (irq >= NR_IRQS) { | 613 | if (irq >= nr_irqs) { |
614 | printk(KERN_ERR "Trying to mark IRQ%d non-probeable\n", irq); | 614 | printk(KERN_ERR "Trying to mark IRQ%d non-probeable\n", irq); |
615 | 615 | ||
616 | return; | 616 | return; |
@@ -628,7 +628,7 @@ void __init set_irq_probe(unsigned int irq) | |||
628 | struct irq_desc *desc; | 628 | struct irq_desc *desc; |
629 | unsigned long flags; | 629 | unsigned long flags; |
630 | 630 | ||
631 | if (irq >= NR_IRQS) { | 631 | if (irq >= nr_irqs) { |
632 | printk(KERN_ERR "Trying to mark IRQ%d probeable\n", irq); | 632 | printk(KERN_ERR "Trying to mark IRQ%d probeable\n", irq); |
633 | 633 | ||
634 | return; | 634 | return; |