From patchwork Wed Nov 9 14:23:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 81496 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp223106qge; Wed, 9 Nov 2016 06:24:29 -0800 (PST) X-Received: by 10.99.109.6 with SMTP id i6mr27001151pgc.139.1478701469613; Wed, 09 Nov 2016 06:24:29 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fn7si25856731pab.115.2016.11.09.06.24.29; Wed, 09 Nov 2016 06:24:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753456AbcKIOY1 (ORCPT + 4 others); Wed, 9 Nov 2016 09:24:27 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:61095 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753968AbcKIOYN (ORCPT ); Wed, 9 Nov 2016 09:24:13 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGD00IOOPCCOV50@mailout1.w1.samsung.com>; Wed, 09 Nov 2016 14:24:12 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161109142411eucas1p19889361801f5f5860933a569b058947a~FZyLSdORs1372813728eucas1p1w; Wed, 9 Nov 2016 14:24:11 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges5.samsung.com (EUCPMTA) with SMTP id DF.5A.19540.B8133285; Wed, 9 Nov 2016 14:24:11 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20161109142411eucas1p2dc6769c2c713813ce3aaedf74189435d~FZyKnwY8r2633826338eucas1p2u; Wed, 9 Nov 2016 14:24:11 +0000 (GMT) X-AuditID: cbfec7f5-f79ce6d000004c54-05-5823318bce27 Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 35.CD.10494.E6133285; Wed, 9 Nov 2016 14:23:42 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OGD009LGPC36HB0@eusync2.samsung.com>; Wed, 09 Nov 2016 14:24:10 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Ulf Hansson , Bartlomiej Zolnierkiewicz , Javier Martinez Canillas Subject: [PATCH 09/12] exynos-gsc: Simplify system PM even more Date: Wed, 09 Nov 2016 15:23:58 +0100 Message-id: <1478701441-29107-10-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1478701441-29107-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrLIsWRmVeSWpSXmKPExsWy7djP87rdhsoRBndWaVhsnLGe1eLN2zVM FufPb2C36NmwldVixvl9TBZrj9xltzj8pp3V4vjacAcOj02rOtk87lzbw+axpf8uu0ffllWM Hp83yQWwRnHZpKTmZJalFunbJXBlvP97l73gK2fFq6eX2RsYD3J0MXJySAiYSNyd95YRwhaT uHBvPVsXIxeHkMBSRonG9uWMEM5nRokjK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wENi6/JZjBMYeRcw MqxiFEktLc5Nzy020itOzC0uzUvXS87P3cQIDOttx35u2cHY9S74EKMAB6MSD2+HpnKEEGti WXFl7iFGCQ5mJRHemQZAId6UxMqq1KL8+KLSnNTiQ4ymQEdNZJYSTc4HxlxeSbyhiaG5paGR sYWFuZGRkjjv1A9XwoUE0hNLUrNTUwtSi2D6mDg4pRoYvUIOzCnT8wzhWnr5TtzMGXdcDcOn Nrn5/kuPX7jt+NT/3/L/OS99d3DbHPGuHT+7u0ykC47u+eyd/WrJtglPbkUnNTMZvP3jXKlg 7+3bxczbmGP3sCrU5qh00M3nqh7PjX6Vxtdt5vxy18v0+qLUHRbPM4t6u28cseBIt/CuWzT9 lnJnnfh9JZbijERDLeai4kQA27LynoECAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161109142411eucas1p2dc6769c2c713813ce3aaedf74189435d X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20161109142411eucas1p2dc6769c2c713813ce3aaedf74189435d X-RootMTR: 20161109142411eucas1p2dc6769c2c713813ce3aaedf74189435d References: <1478701441-29107-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org System pm callbacks only ensures that device is runtime suspended/resumed, so remove them and use generic pm_runtime_force_suspend/resume helper. Signed-off-by: Marek Szyprowski --- drivers/media/platform/exynos-gsc/gsc-core.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Ulf Hansson diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index 4859727..1e8b216 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1166,26 +1166,9 @@ static int gsc_runtime_suspend(struct device *dev) } #endif -#ifdef CONFIG_PM_SLEEP -static int gsc_resume(struct device *dev) -{ - if (!pm_runtime_suspended(dev)) - return gsc_runtime_resume(dev); - - return 0; -} - -static int gsc_suspend(struct device *dev) -{ - if (!pm_runtime_suspended(dev)) - return gsc_runtime_suspend(dev); - - return 0; -} -#endif - static const struct dev_pm_ops gsc_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(gsc_suspend, gsc_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) SET_RUNTIME_PM_OPS(gsc_runtime_suspend, gsc_runtime_resume, NULL) };