From patchwork Thu Jan 19 22:36:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 9527047 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 695816020B for ; Thu, 19 Jan 2017 22:37:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 584EA28639 for ; Thu, 19 Jan 2017 22:37:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B2E028670; Thu, 19 Jan 2017 22:37:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=2.0 tests=BAYES_00,RDNS_NONE autolearn=no version=3.3.1 Received: from bombadil.infradead.org (unknown [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EE35A28639 for ; Thu, 19 Jan 2017 22:37:02 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cULKE-00021O-ET; Thu, 19 Jan 2017 22:36:58 +0000 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49] helo=osg.samsung.com) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cULKB-0001vB-82 for linux-arm-kernel@lists.infradead.org; Thu, 19 Jan 2017 22:36:57 +0000 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id D555AA13E4; Thu, 19 Jan 2017 22:36:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osg.samsung.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (s-opensource.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d6GOsyT3lwgE; Thu, 19 Jan 2017 22:36:50 +0000 (UTC) Received: from minerva.localdomain (unknown [181.121.136.80]) by osg.samsung.com (Postfix) with ESMTPSA id 42780A1314; Thu, 19 Jan 2017 22:36:44 +0000 (UTC) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] [media] exynos-gsc: Fix unbalanced pm_runtime_enable() error Date: Thu, 19 Jan 2017 19:36:19 -0300 Message-Id: <1484865380-12651-1-git-send-email-javier@osg.samsung.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170119_143655_321524_2DC04D23 X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ulf Hansson , linux-samsung-soc@vger.kernel.org, linux-media@vger.kernel.org, Shuah Khan , Andi Shyti , Inki Dae , Javier Martinez Canillas , Kukjin Kim , Krzysztof Kozlowski , Sylwester Nawrocki , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Commit a006c04e6218 ("[media] exynos-gsc: Fixup clock management at ->remove()") changed the driver's .remove function logic to fist do a pm_runtime_get_sync() to make sure the device is powered before attempting to gate the gsc clock. But the commit also removed a pm_runtime_disable() call that leads to an unbalanced pm_runtime_enable() error if the driver is removed and re-probed: exynos-gsc 13e00000.video-scaler: Unbalanced pm_runtime_enable! exynos-gsc 13e10000.video-scaler: Unbalanced pm_runtime_enable! Fixes: a006c04e6218 ("[media] exynos-gsc: Fixup clock management at ->remove()") Signed-off-by: Javier Martinez Canillas Acked-by: Marek Szyprowski --- Changes in v2: - Added Marek Szyprowski's Acked-by tag. drivers/media/platform/exynos-gsc/gsc-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index cbf75b6194b4..83272f10722d 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1118,6 +1118,7 @@ static int gsc_remove(struct platform_device *pdev) clk_disable_unprepare(gsc->clock[i]); pm_runtime_put_noidle(&pdev->dev); + pm_runtime_disable(&pdev->dev); dev_dbg(&pdev->dev, "%s driver unloaded\n", pdev->name); return 0;