Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933246AbaD3J3A (ORCPT ); Wed, 30 Apr 2014 05:29:00 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:19826 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933147AbaD3J2y (ORCPT ); Wed, 30 Apr 2014 05:28:54 -0400 X-AuditID: cbfee68e-b7fd86d0000038e3-c2-5360c255b1c7 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, t.figa@samsung.com Subject: [PATCH 5/5 v3] iio: exynos_adc: do a reinit_completion before the conversion Date: Wed, 30 Apr 2014 14:56:55 +0530 Message-id: <1398850015-17761-6-git-send-email-ch.naveen@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1398850015-17761-1-git-send-email-ch.naveen@samsung.com> References: <1398850015-17761-1-git-send-email-ch.naveen@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjkeLIzCtJLcpLzFFi42JZI2JSpRt6KCHY4OBMbYuXhzQtzi47yGbR vHg9m8WrIz+YLJZMns9qMe/IOxaLy7vmsFnMOL+PyWLRtv/MFutnvGZx4PKY3XCRxWPnrLvs HvvnrmH3WPLmEKtH35ZVjB6fN8kFsEVx2aSk5mSWpRbp2yVwZWx++ZS14CdbxbmFzcwNjC9Z uxg5OSQETCQ2rZrBBmGLSVy4tx7MFhJYyijx420aTM2Ztk3MXYxcQPHpjBKb/35mgijqZ5Lo PRIFYrMJmEkcXLSavYuRg0NEQFZiZrceSD2zwBOgOVteM4PEhQXCJVYsTAIpZxFQldi84CML iM0r4Cqx4f0ZRpASCQEFiTmTbEDCnAJuEs1HF7JAbHKVaDp7mAlkpITAIXaJO+1b2CDmCEh8 m3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W1ILUIZgsTB6dUA2P0xY6vLO0/5xbO2Dx5I2fFjL/F P1X3zn/K+eUOk+g9Zoa0FW86vtTIHX3/eHWx0IydqZKGLGeWcSUFRwue+27kON3v0tPJwW8E zsp7n2647FoS+1zd/mr5OqWp05YlPXWVquz9o7FNWJTNecUxI6upbXpZP7O//WrY3dUr6pI+ o//6t0Nb05YosRRnJBpqMRcVJwIAkLfHk/cCAAA= 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. Signed-off-by: Naveen Krishna Chatradhi Reviewed-by: Doug Anderson --- Changes since v2: None Changes since v1: None v0: This change is a part of the patch reviewed at https://lkml.org/lkml/2013/11/5/92 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 eddc58e..010578f 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/