From patchwork Tue Apr 27 10:25:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12226089 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F01EC433B4 for ; Tue, 27 Apr 2021 10:30:36 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E3052613C8 for ; Tue, 27 Apr 2021 10:30:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E3052613C8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nB5aRkzAvy/YRcjKCK9/Fy9Lt4pxuZAbFR8TyOv/0ZQ=; b=jSr89Cb8iXZ98F1IdrKAxFKs/ Lf8wRtKQRzvnlBG35BUHeRbhXDmi3TE7qLF0MIAlmm9eNqmCPFVi3s1+BCgLXbKhJSJMcwDvWCRC4 QVFN4IIZ6ivGLCXcEX+NAaLEyptSsDfPkgd58Qtv4sbpSKovePxZag3R4/MiY02DNpkiElni/FtAw yUZzBEFBSug+nPtn4NfkUVuHKWCWOZBaJnLAFk8TBgqNcmxjpmKxNld3hjugYamG4YtXUvSRUClMh pf0KNHCnK1Td7kHul4Wv50u1wN8zbQF5eNCbR5XbsLmvfI0NPWiaMI97eQ55OiwVR0eSGjL6rbnhr J/HfTf7fQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbKxi-001NOU-0M; Tue, 27 Apr 2021 10:29:02 +0000 Received: from bombadil.infradead.org ([198.137.202.133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbKw9-001Mz2-D4 for linux-arm-kernel@desiato.infradead.org; Tue, 27 Apr 2021 10:27:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=79dWgd//jb1ogaDGIhMBJ4K4q3CzJDbVFoiHLI9HXdc=; b=WprjmjXSxFS1FKTF/c4PxlCdo6 ZIvUPxOFEoKqpnrgvBfajZUUFpXl5UUjjDfJPjapjOBgrmJsZcebySmJfE9ajmNsLptgZIXEOQiem jSF1/B2/AEGXQBIkueGqsbBcBeJnDaXBpglH5iHHWMGFutndBLsklgPCNRZkIQ2X8jafDiqHZdiGo UWmInmAhCOx+uSdIxB/fq5CLvXREb6eSe0VdumFYsgNW1Iu/kCnXR0YchcaN0wIUmi98Ef0d/elbU LMSJJMSZy5S/FKl6pgwpIcdIiC0z2qjjEd0/CzzdfwBeFo2nsPz1ju2mnIeUtOYQIp7nBtMS90B2q y9eWEutQ==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbKw5-00GdBI-HG for linux-arm-kernel@lists.infradead.org; Tue, 27 Apr 2021 10:27:24 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 26551613DC; Tue, 27 Apr 2021 10:27:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619519236; bh=f7qp1inQpFhzLXGKfN6L+okBW8R7Adck1d72J+XCiZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nk63xs/U5+H50yDNDVtINBdbnbVjdI0k1ER0vB6Hueg8zEeM20wKRYFpCgZB6IzI6 4DgCSqWfQuKbb+nAiQOEuJi+2A4CAVyRS+61A0W7pDU4zZmZaMOZg2ld/q0xsLEd5E A6PnPJqgPN/61bhxJgGkIJ/mmX4qVJNpH0hSlCDv2hvWNvtwEqBz6IDuhcyYs+h8/p mkwJQ+WEp427ZpNOk1w6SEqZtGBTTkf82tdvOKiU4Dtrg+5m24F+LgZIGUdVSqzfrt 5HLBeRQfWE3CYhPOGIep8lw7SSmxc6CTu56a0PI0XPkjlG37DtPhmlQy2QWc+FKR7V oH1idtQg/J8dQ== Received: by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1lbKvv-000nzV-3G; Tue, 27 Apr 2021 12:27:11 +0200 From: Mauro Carvalho Chehab To: Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Ezequiel Garcia , Hans Verkuil , Krzysztof Kozlowski , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v3 06/79] media: exynos-gsc: don't resume at remove time Date: Tue, 27 Apr 2021 12:25:56 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210427_032721_660654_4E9F2C00 X-CRM114-Status: GOOD ( 10.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Calling pm_runtime_get_sync() at driver's removal time is not needed, as this will resume PM runtime. Also, the PM runtime code at pm_runtime_disable() already calls it, if it detects the need. So, simplify the code by getting rid of that. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/exynos-gsc/gsc-core.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index 9f41c2e7097a..70e86cdc1012 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1210,8 +1210,6 @@ static int gsc_remove(struct platform_device *pdev) struct gsc_dev *gsc = platform_get_drvdata(pdev); int i; - pm_runtime_get_sync(&pdev->dev); - gsc_unregister_m2m_device(gsc); v4l2_device_unregister(&gsc->v4l2_dev); @@ -1219,7 +1217,6 @@ static int gsc_remove(struct platform_device *pdev) for (i = 0; i < gsc->num_clocks; i++) 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);