Merge branch 'x86-irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / drivers / mfd / wm8350-core.c
index e400a3bed06374786cf22974097b882e4434d218..b5807484b4c92424e04b7232c5ab41b3b020db95 100644 (file)
@@ -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. */