summaryrefslogtreecommitdiffstats
path: root/kernel/irq/autoprobe.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-06-29 02:24:37 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 10:26:21 -0700
commit74ffd553a3a7fbae34be70b751852d5b6fe5acac (patch)
treea92e746310fc73cc5577b8a1cb6e6552f8dc630a /kernel/irq/autoprobe.c
parentd1bef4ed5faf7d9872337b33c4269e45ae1bf960 (diff)
downloadlinux-stable-74ffd553a3a7fbae34be70b751852d5b6fe5acac.tar.gz
linux-stable-74ffd553a3a7fbae34be70b751852d5b6fe5acac.tar.bz2
linux-stable-74ffd553a3a7fbae34be70b751852d5b6fe5acac.zip
[PATCH] genirq: sem2mutex probe_sem -> probing_active
Convert the irq auto-probing semaphore to a mutex. (This allows us to find probing API usage bugs sooner, via the mutex debugging code.) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/irq/autoprobe.c')
-rw-r--r--kernel/irq/autoprobe.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/irq/autoprobe.c b/kernel/irq/autoprobe.c
index 6f1e68a46cbc..d1f1e6f10a23 100644
--- a/kernel/irq/autoprobe.c
+++ b/kernel/irq/autoprobe.c
@@ -16,7 +16,7 @@
* comes in on to an unassigned handler will get stuck with
* "IRQ_WAITING" cleared and the interrupt disabled.
*/
-static DECLARE_MUTEX(probe_sem);
+static DEFINE_MUTEX(probing_active);
/**
* probe_irq_on - begin an interrupt autodetect
@@ -31,7 +31,7 @@ unsigned long probe_irq_on(void)
irq_desc_t *desc;
unsigned int i;
- down(&probe_sem);
+ mutex_lock(&probing_active);
/*
* something may have generated an irq long ago and we want to
* flush such a longstanding irq before considering it as spurious.
@@ -132,7 +132,7 @@ unsigned int probe_irq_mask(unsigned long val)
}
spin_unlock_irq(&desc->lock);
}
- up(&probe_sem);
+ mutex_unlock(&probing_active);
return mask & val;
}
@@ -177,10 +177,11 @@ int probe_irq_off(unsigned long val)
}
spin_unlock_irq(&desc->lock);
}
- up(&probe_sem);
+ mutex_unlock(&probing_active);
if (nr_irqs > 1)
irq_found = -irq_found;
+
return irq_found;
}