From patchwork Sat Apr 26 11:37:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naveen Krishna Chatradhi X-Patchwork-Id: 4068031 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AF6DF9F271 for ; Sat, 26 Apr 2014 11:40:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E321420274 for ; Sat, 26 Apr 2014 11:40:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 07ECA20266 for ; Sat, 26 Apr 2014 11:40:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752234AbaDZLjw (ORCPT ); Sat, 26 Apr 2014 07:39:52 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:22873 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752230AbaDZLjt (ORCPT ); Sat, 26 Apr 2014 07:39:49 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4M00B4HZ2CHH60@mailout4.samsung.com>; Sat, 26 Apr 2014 20:39:48 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.123]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 99.5C.09952.40B9B535; Sat, 26 Apr 2014 20:39:48 +0900 (KST) X-AuditID: cbfee690-b7fcd6d0000026e0-5b-535b9b045e8d Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 99.87.25708.30B9B535; Sat, 26 Apr 2014 20:39:48 +0900 (KST) Received: from chnaveen-ubuntu.sisodomain.com ([107.108.83.161]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4M00JX6Z1YTP80@mmp2.samsung.com>; Sat, 26 Apr 2014 20:39:47 +0900 (KST) 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, jic23@kernel.org Subject: [PATCH 5/5 v2] iio: exynos_adc: do a reinit_completion before the conversion Date: Sat, 26 Apr 2014 17:07:56 +0530 Message-id: <1398512276-4105-6-git-send-email-ch.naveen@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1398512276-4105-1-git-send-email-ch.naveen@samsung.com> References: <1398512276-4105-1-git-send-email-ch.naveen@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphkeLIzCtJLcpLzFFi42JZI2JSrcsyOzrYYMVFLouXhzQtzi47yGbR vHg9m8WrIz+YLB40rWKyWDJ5PqvFvCPvWCwu75rDZjHj/D4mi0Xb/jM7cHnMbrjI4rFz1l12 j02rOtk89s9dw+6x5M0hVo++LasYPT5vkgtgj+KySUnNySxLLdK3S+DK+PfiAGPBW9aKIys+ MDYw/mTpYuTkkBAwkfh2/AYThC0mceHeerYuRi4OIYGljBIrVj9hhylaeXsOO0RiOqPEylsf wBJCAv1MEru22YPYbAJmEgcXrQaKc3CICMhKzOzWA6lnFnjEKDHjYS8jSFxYIFxi51obkHIW AVWJxf0TwI7gFXCROPL4BDNIiYSAgsScSWAlnAKuEhMXXWWC2OQi8Xbia7ATJAQOsUsc3bSP BWKOgMS3yYdYIHplJTYdYIY4WVLi4IobLBMYhRcwMqxiFE0tSC4oTkovMtErTswt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7r9e5TGt6GfLijO7H16bVu97EJn8+bn277obdte+7btkxOHiGbU1kPH9W VfjAy08tm90/qrNeWtf72EtGmkFf+dbxLz2ZPCdXP5COsRfmKWoVfP50RutaeUFJ3j1LbH7s dU9acyo5P7J4sRJLcUaioRZzUXEiAMJZCfv8AgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add reinit_completion() before the wait_for_completion_timeout in raw_read() call. Signed-off-by: Naveen Krishna Chatradhi Reviewed-by: Doug Anderson --- 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) {