From patchwork Fri May 31 14:37:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 2644311 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id A8FF73FD4E for ; Fri, 31 May 2013 14:41:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754930Ab3EaOlF (ORCPT ); Fri, 31 May 2013 10:41:05 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:63478 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753873Ab3EaOlD (ORCPT ); Fri, 31 May 2013 10:41:03 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MNO00ELB3G99NW0@mailout4.samsung.com> for linux-media@vger.kernel.org; Fri, 31 May 2013 23:41:02 +0900 (KST) X-AuditID: cbfee61a-b7f3b6d000006edd-1a-51a8b67ed261 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id CF.C0.28381.E76B8A15; Fri, 31 May 2013 23:41:02 +0900 (KST) Received: from amdc1344.digital.local ([106.116.147.32]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MNO00BWU3ALE760@mmp1.samsung.com>; Fri, 31 May 2013 23:41:02 +0900 (KST) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, hj210.choi@samsung.com, arun.kk@samsung.com, shaik.ameer@samsung.com, kyungmin.park@samsung.com, Sylwester Nawrocki Subject: [REVIEW PATCH v2 05/11] exynos4-is: Do not use asynchronous runtime PM in release fop Date: Fri, 31 May 2013 16:37:21 +0200 Message-id: <1370011047-11488-6-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1370011047-11488-1-git-send-email-s.nawrocki@samsung.com> References: <1370011047-11488-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkluLIzCtJLcpLzFFi42I5/e+xgG7dthWBBhOnW1p8PHWb1eLxxmvM Fmeb3rBbdE5cwm7Rs2Erq8XhN+2sFkce7mZ3YPeY3TGT1aNvyypGj8+b5AKYo7hsUlJzMstS i/TtErgyXvzfwVgwibPi9KJO1gbG5+xdjJwcEgImEu3LL7JC2GISF+6tZ+ti5OIQEljEKLF6 5kUop4NJounkDhaQKjYBQ4neo32MILaIgLzEk94bYEXMAtsZJc4sW8UMkhAWSJDY+2Q3kM3B wSKgKrH9fRRImFfATeL50a3sIGEJAQWJOZNsQMKcAu4Shz8uZQOxhYBKjrb/YZ/AyLuAkWEV o2hqQXJBcVJ6rqFecWJucWleul5yfu4mRnAAPZPawbiyweIQowAHoxIPr8GKFYFCrIllxZW5 hxglOJiVRHjz5wCFeFMSK6tSi/Lji0pzUosPMUpzsCiJ8x5otQ4UEkhPLEnNTk0tSC2CyTJx cEo1MJpPjK1ZfMPUWWnOuQ2xCrM2+ZVs+Fmj+WWeWP3616fvheZGKcwye/x9g+wivv/n62YI /Fg9R16vsrNye/SpWQkWmafenewOZDKwmd7OvEQ4ttrNuTji8pLI+5EcS/IMMyObhJyjpRau i+X8/VrDUqdSoLbE39qw9O6uFQXp1odNWA5UnXCbpsRSnJFoqMVcVJwIAOZQkbIcAgAA Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Use pm_runtime_put_sync() instead of pm_runtime_put() to avoid races in handling the 'state' bit flags when the fimc-capture drivers' runtime_resume callback is called from the PM workqueue. Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park --- drivers/media/platform/exynos4-is/fimc-capture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c index 3b24f29..534ea68 100644 --- a/drivers/media/platform/exynos4-is/fimc-capture.c +++ b/drivers/media/platform/exynos4-is/fimc-capture.c @@ -496,7 +496,7 @@ static int fimc_capture_open(struct file *file) ret = v4l2_fh_open(file); if (ret) { - pm_runtime_put(&fimc->pdev->dev); + pm_runtime_put_sync(&fimc->pdev->dev); goto unlock; } @@ -564,7 +564,7 @@ static int fimc_capture_release(struct file *file) fimc_md_graph_unlock(&vc->ve); } - pm_runtime_put(&fimc->pdev->dev); + pm_runtime_put_sync(&fimc->pdev->dev); mutex_unlock(&fimc->lock); return ret;