iio: exynos_adc: do a reinit_completion before the conversion
authorNaveen Krishna Chatradhi <ch.naveen@samsung.com>
Wed, 30 Apr 2014 09:26:00 +0000 (10:26 +0100)
committerJonathan Cameron <jic23@kernel.org>
Wed, 30 Apr 2014 20:47:47 +0000 (21:47 +0100)
Add reinit_completion() before the wait_for_completion_timeout in
raw_read() call.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/exynos_adc.c

index a9946ec7a3b7768e410d76575a557298ee5f76d1..d325aeafe5cbf23a45fa6b7093535e73f1aaa09a 100644 (file)
@@ -151,6 +151,7 @@ static int exynos_read_raw(struct iio_dev *indio_dev,
                return -EINVAL;
 
        mutex_lock(&indio_dev->mlock);
+       reinit_completion(&info->completion);
 
        /* Select the channel to be used and Trigger conversion */
        if (info->version == ADC_V2) {
This page took 0.033711 seconds and 5 git commands to generate.