Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753167AbaDYKRv (ORCPT ); Fri, 25 Apr 2014 06:17:51 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:23950 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752915AbaDYKQq (ORCPT ); Fri, 25 Apr 2014 06:16:46 -0400 X-AuditID: cbfee68e-b7fd86d0000038e3-14-535a360c2752 From: Naveen Krishna Chatradhi To: linux-iio@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, dianders@chromium.org, gregkh@linuxfoundation.org, naveenkrishna.ch@gmail.com, lars@metafoo.de, cpgs@samsung.com, grundler@chromium.org Subject: [PATCH 5/5] iio: exynos_adc: do a reinit_completion before the conversion Date: Fri, 25 Apr 2014 15:44:47 +0530 Message-id: <1398420888-5506-6-git-send-email-ch.naveen@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1398420888-5506-1-git-send-email-ch.naveen@samsung.com> References: <1398420888-5506-1-git-send-email-ch.naveen@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmkeLIzCtJLcpLzFFi42JZI2JSq8tjFhVscPKMkcXLQ5oWZ5cdZLNo XryezeLVkR9MFksmz2e1mHfkHYvF5V1z2CxmnN/HZLFo239mB06P2Q0XWTx2zrrL7rF/7hp2 jyVvDrF69G1ZxejxeZNcAFsUl01Kak5mWWqRvl0CV8bRK9tZCt6zVvx4NIO1gfEvSxcjJ4eE gInExKaVULaYxIV769m6GLk4hASWMkqcer2bEabo3e1JUInpjBKvv01lgXD6mSRWN3xlA6li EzCTOLhoNXsXIweHiICsxMxuPZAaZoELjBI/v0xgBYkLC4RI7HiUBVLOIqAqcX/TQ1YQm1fA RWLSwUlMICUSAgoScybZgIQ5BVwl1u8+BlYiBFRyf8sfVpCREgLb2CVab/5jhpgjIPFt8iEW iF5ZiU0HmCFulpQ4uOIGywRG4QWM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w M37iWGjSMHv++ZU7LBlXap4JSI/nitfo6nrY3Kfes7rQ0/dBccXNnMaG+8sz7QUfTCqed9uH d/769zU7n1k6ibI5G9e9uhf85Pmted5pv+8VzU+7prl3wq3YzPmmncfbWE3do2o73rxT7Vyr xFKckWioxVxUnAgA9NKzMfMCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add reinit_completion() before the wait_for_completion_timeout in raw_read() call. Change-Id: I70fa00841bc49eba838a5bd6779015844297dfdb Signed-off-by: Naveen Krishna Chatradhi --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/