aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-10-16 09:33:18 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:53:30 -0400
commit63d659d556f145d33798b8ad19ced10c254fe445 (patch)
tree2d657b684d13539893bd944bb85c546cb74b1396 /kernel/irq
parent10e580842ec8e53dddf62e1ab1871f4906477376 (diff)
genirq: fix name space collision of nr_irqs in autoprobe.c
probe_irq_off() is disfunctional as the local nr_irqs is referenced instead of the global one for the for_each_irq_desc() iterator. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/autoprobe.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/irq/autoprobe.c b/kernel/irq/autoprobe.c
index 0cbff18efb6..cc0f7321b8c 100644
--- a/kernel/irq/autoprobe.c
+++ b/kernel/irq/autoprobe.c
@@ -161,7 +161,7 @@ EXPORT_SYMBOL(probe_irq_mask);
161 */ 161 */
162int probe_irq_off(unsigned long val) 162int probe_irq_off(unsigned long val)
163{ 163{
164 int i, irq_found = 0, nr_irqs = 0; 164 int i, irq_found = 0, nr_of_irqs = 0;
165 struct irq_desc *desc; 165 struct irq_desc *desc;
166 unsigned int status; 166 unsigned int status;
167 167
@@ -171,9 +171,9 @@ int probe_irq_off(unsigned long val)
171 171
172 if (status & IRQ_AUTODETECT) { 172 if (status & IRQ_AUTODETECT) {
173 if (!(status & IRQ_WAITING)) { 173 if (!(status & IRQ_WAITING)) {
174 if (!nr_irqs) 174 if (!nr_of_irqs)
175 irq_found = i; 175 irq_found = i;
176 nr_irqs++; 176 nr_of_irqs++;
177 } 177 }
178 desc->status = status & ~IRQ_AUTODETECT; 178 desc->status = status & ~IRQ_AUTODETECT;
179 desc->chip->shutdown(i); 179 desc->chip->shutdown(i);
@@ -182,7 +182,7 @@ int probe_irq_off(unsigned long val)
182 } 182 }
183 mutex_unlock(&probing_active); 183 mutex_unlock(&probing_active);
184 184
185 if (nr_irqs > 1) 185 if (nr_of_irqs > 1)
186 irq_found = -irq_found; 186 irq_found = -irq_found;
187 187
188 return irq_found; 188 return irq_found;