浏览代码

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>
Naveen Krishna Chatradhi 11 年之前
父节点
当前提交
6442d94ba1
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/iio/adc/exynos_adc.c

+ 1 - 0
drivers/iio/adc/exynos_adc.c

@@ -151,6 +151,7 @@ static int exynos_read_raw(struct iio_dev *indio_dev,
 		return -EINVAL;
 		return -EINVAL;
 
 
 	mutex_lock(&indio_dev->mlock);
 	mutex_lock(&indio_dev->mlock);
+	reinit_completion(&info->completion);
 
 
 	/* Select the channel to be used and Trigger conversion */
 	/* Select the channel to be used and Trigger conversion */
 	if (info->version == ADC_V2) {
 	if (info->version == ADC_V2) {