Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / drivers / mfd / wm831x-core.c
index a3d5728b64492e6ac3a0fabc1b8fa2fc1862aeb9..f2ab025ad97a3cad7532ad95b21684cf4561ff5e 100644 (file)
@@ -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));