Skip to content

Commit

Permalink
genirq: fix name space collision of nr_irqs in autoprobe.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Oct 16, 2008
1 parent 10e5808 commit 63d659d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kernel/irq/autoprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ EXPORT_SYMBOL(probe_irq_mask);
*/
int probe_irq_off(unsigned long val)
{
int i, irq_found = 0, nr_irqs = 0;
int i, irq_found = 0, nr_of_irqs = 0;
struct irq_desc *desc;
unsigned int status;

Expand All @@ -171,9 +171,9 @@ int probe_irq_off(unsigned long val)

if (status & IRQ_AUTODETECT) {
if (!(status & IRQ_WAITING)) {
if (!nr_irqs)
if (!nr_of_irqs)
irq_found = i;
nr_irqs++;
nr_of_irqs++;
}
desc->status = status & ~IRQ_AUTODETECT;
desc->chip->shutdown(i);
Expand All @@ -182,7 +182,7 @@ int probe_irq_off(unsigned long val)
}
mutex_unlock(&probing_active);

if (nr_irqs > 1)
if (nr_of_irqs > 1)
irq_found = -irq_found;

return irq_found;
Expand Down

0 comments on commit 63d659d

Please sign in to comment.