diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-06-26 18:26:13 +0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-06-26 18:26:13 +0400 |
commit | cfc736564fd01ee008d746913b1bbb90e3eb1f99 (patch) | |
tree | 6192a27c1ace4bf76795dadadbe1eb63cbe47429 /drivers | |
parent | cd701aa27e4cfab5c99c7da13d404b1f3a0aecfb (diff) | |
download | linux-cfc736564fd01ee008d746913b1bbb90e3eb1f99.tar.xz |
[ARM] fix drivers/mfd/ucb1x00-core.c IRQ probing bug
While reviewing the IRQ autoprobing code i found the attached buglet.
probe_irq_on()/off() calls must always be in pairs, because the generic IRQ
code uses a global semaphore to serialize all autoprobing activites.
(which does make sense) The ARM code's probe_irq_*() implementation does
not do this, but if this driver is ever used on another platform, this bug
might bite.
(It probably does not trigger in practice, because a zero probing mask
returned should be rare - but still.)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mfd/ucb1x00-core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c index aff83f966803..c8426a9bf273 100644 --- a/drivers/mfd/ucb1x00-core.c +++ b/drivers/mfd/ucb1x00-core.c @@ -420,8 +420,10 @@ static int ucb1x00_detect_irq(struct ucb1x00 *ucb) unsigned long mask; mask = probe_irq_on(); - if (!mask) + if (!mask) { + probe_irq_off(mask); return NO_IRQ; + } /* * Enable the ADC interrupt. |