diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-13 14:48:10 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-13 14:48:10 -0700 |
commit | 6a251b0ab67989f468f4cb65179e0cf40cf8c295 (patch) | |
tree | f0e857619ca27e552fd0e9e929d428ab5faefd8b | |
parent | 9e766d81b1f432826fd773fc5d679b8a8095e941 (diff) | |
parent | 5051d411ec87381693433d24c4488b2fa4a6306c (diff) | |
download | op-kernel-dev-6a251b0ab67989f468f4cb65179e0cf40cf8c295.zip op-kernel-dev-6a251b0ab67989f468f4cb65179e0cf40cf8c295.tar.gz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
mfd: Clean up after WM83xx AUXADC interrupt if it arrives late
-rw-r--r-- | drivers/mfd/wm831x-core.c | 3 | ||||
-rw-r--r-- | drivers/mfd/wm8350-core.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c index a3d5728..f2ab025 100644 --- a/drivers/mfd/wm831x-core.c +++ b/drivers/mfd/wm831x-core.c @@ -349,6 +349,9 @@ int wm831x_auxadc_read(struct wm831x *wm831x, enum wm831x_auxadc input) goto disable; } + /* If an interrupt arrived late clean up after it */ + try_wait_for_completion(&wm831x->auxadc_done); + /* Ignore the result to allow us to soldier on without IRQ hookup */ wait_for_completion_timeout(&wm831x->auxadc_done, msecs_to_jiffies(5)); diff --git a/drivers/mfd/wm8350-core.c b/drivers/mfd/wm8350-core.c index e400a3b..b580748 100644 --- a/drivers/mfd/wm8350-core.c +++ b/drivers/mfd/wm8350-core.c @@ -363,6 +363,10 @@ int wm8350_read_auxadc(struct wm8350 *wm8350, int channel, int scale, int vref) reg |= 1 << channel | WM8350_AUXADC_POLL; wm8350_reg_write(wm8350, WM8350_DIGITISER_CONTROL_1, reg); + /* If a late IRQ left the completion signalled then consume + * the completion. */ + try_wait_for_completion(&wm8350->auxadc_done); + /* We ignore the result of the completion and just check for a * conversion result, allowing us to soldier on if the IRQ * infrastructure is not set up for the chip. */ |