summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaveen Krishna Chatradhi <ch.naveen@samsung.com>2014-04-30 13:26:00 +0400
committerJonathan Cameron <jic23@kernel.org>2014-05-01 00:47:47 +0400
commit6442d94ba19da5424d670f4a4523be45e1ee78d9 (patch)
treebd3d66007664de4f3fe96a0cb8c6286218e6b40d
parentdd2723f57e3cd8f104884636e92492b884080d59 (diff)
downloadlinux-6442d94ba19da5424d670f4a4523be45e1ee78d9.tar.xz
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 <ch.naveen@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/iio/adc/exynos_adc.c1
1 files changed, 1 insertions, 0 deletions
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) {