[PATCH 5/5 v2] iio: exynos_adc: do a reinit_completion before the conversion

From: Naveen Krishna Chatradhi
Date: Sat Apr 26 2014 - 07:39:59 EST


Add reinit_completion() before the wait_for_completion_timeout in
raw_read() call.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@xxxxxxxxxxx>
Reviewed-by: Doug Anderson <dianders@xxxxxxxxxxxx>
---
drivers/iio/adc/exynos_adc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index 805c9f6..32290e6 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) {
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/