From 6442d94ba19da5424d670f4a4523be45e1ee78d9 Mon Sep 17 00:00:00 2001 From: Naveen Krishna Chatradhi Date: Wed, 30 Apr 2014 10:26:00 +0100 Subject: 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 --- drivers/iio/adc/exynos_adc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/iio/adc/exynos_adc.c') diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c index a9946ec7a3b..d325aeafe5c 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) { -- cgit v1.2.3-70-g09d2