From: Naveen Krishna Chatradhi Date: Wed, 30 Apr 2014 09:26:00 +0000 (+0100) Subject: iio: exynos_adc: do a reinit_completion before the conversion X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6442d94ba19da5424d670f4a4523be45e1ee78d9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git iio: exynos_adc: do a reinit_completion before the conversion Add reinit_completion() before the wait_for_completion_timeout in raw_read() call. Signed-off-by: Naveen Krishna Chatradhi Reviewed-by: Doug Anderson Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c index a9946ec7a3b7..d325aeafe5cb 100644 --- a/drivers/iio/adc/exynos_adc.c +++ b/drivers/iio/adc/exynos_adc.c @@ -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) {