diff options
-rw-r--r-- | kernel/irq/autoprobe.c | 9 |
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 @@ | |||
16 | * comes in on to an unassigned handler will get stuck with | 16 | * comes in on to an unassigned handler will get stuck with |
17 | * "IRQ_WAITING" cleared and the interrupt disabled. | 17 | * "IRQ_WAITING" cleared and the interrupt disabled. |
18 | */ | 18 | */ |
19 | static DECLARE_MUTEX(probe_sem); | 19 | static DEFINE_MUTEX(probing_active); |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * probe_irq_on - begin an interrupt autodetect | 22 | * probe_irq_on - begin an interrupt autodetect |
@@ -31,7 +31,7 @@ unsigned long probe_irq_on(void) | |||
31 | irq_desc_t *desc; | 31 | irq_desc_t *desc; |
32 | unsigned int i; | 32 | unsigned int i; |
33 | 33 | ||
34 | down(&probe_sem); | 34 | mutex_lock(&probing_active); |
35 | /* | 35 | /* |
36 | * something may have generated an irq long ago and we want to | 36 | * something may have generated an irq long ago and we want to |
37 | * flush such a longstanding irq before considering it as spurious. | 37 | * flush such a longstanding irq before considering it as spurious. |
@@ -132,7 +132,7 @@ unsigned int probe_irq_mask(unsigned long val) | |||
132 | } | 132 | } |
133 | spin_unlock_irq(&desc->lock); | 133 | spin_unlock_irq(&desc->lock); |
134 | } | 134 | } |
135 | up(&probe_sem); | 135 | mutex_unlock(&probing_active); |
136 | 136 | ||
137 | return mask & val; | 137 | return mask & val; |
138 | } | 138 | } |
@@ -177,10 +177,11 @@ int probe_irq_off(unsigned long val) | |||
177 | } | 177 | } |
178 | spin_unlock_irq(&desc->lock); | 178 | spin_unlock_irq(&desc->lock); |
179 | } | 179 | } |
180 | up(&probe_sem); | 180 | mutex_unlock(&probing_active); |
181 | 181 | ||
182 | if (nr_irqs > 1) | 182 | if (nr_irqs > 1) |
183 | irq_found = -irq_found; | 183 | irq_found = -irq_found; |
184 | |||
184 | return irq_found; | 185 | return irq_found; |
185 | } | 186 | } |
186 | 187 | ||