From patchwork Wed Nov 9 14:23:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 9419451 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 106CF601C2 for ; Wed, 9 Nov 2016 14:24:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04A3529352 for ; Wed, 9 Nov 2016 14:24:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EDBA929357; Wed, 9 Nov 2016 14:24:35 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 868CC29352 for ; Wed, 9 Nov 2016 14:24:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754094AbcKIOYb (ORCPT ); Wed, 9 Nov 2016 09:24:31 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:60632 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753182AbcKIOYR (ORCPT ); Wed, 9 Nov 2016 09:24:17 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGD004S2PCBSY40@mailout3.w1.samsung.com>; Wed, 09 Nov 2016 14:24:11 +0000 (GMT) Received: from eusmges1.samsung.com (unknown [203.254.199.239]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20161109142411eucas1p2efcd5fb316d1a7da005eb374070b99ef~FZyKnsfWe2945629456eucas1p2S; Wed, 9 Nov 2016 14:24:11 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1.samsung.com (EUCPMTA) with SMTP id 33.F7.23383.B8133285; Wed, 9 Nov 2016 14:24:11 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161109142410eucas1p198a52c69c695e97965c968d7b899bae8~FZyKAz3Z81373513735eucas1p1_; Wed, 9 Nov 2016 14:24:10 +0000 (GMT) X-AuditID: cbfec7ef-f79e76d000005b57-07-5823318bdb0f Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id D6.AE.07726.A8133285; Wed, 9 Nov 2016 14:24:10 +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 08/12] exynos-gsc: Simplify system PM Date: Wed, 09 Nov 2016 15:23:57 +0100 Message-id: <1478701441-29107-9-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+NgFjrLIsWRmVeSWpSXmKPExsWy7djPc7rdhsoRBicWWVlsnLGe1eLN2zVM FufPb2C36NmwldVixvl9TBZrj9xltzj8pp3V4vjacAcOj02rOtk87lzbw+axpf8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CFcJqYJE5tfskKUsUmYCjR9bYLrENEwEli4ay/7CBFzAKzmCQm9y1hAUkIC5hK zNq8FayBRUBV4vucl8wgNq+Ah8Sk3kvMEOvkJE4emwxWwyngKbHqyE0wWwioZuvyWYwTGHkX MDKsYhRJLS3OTc8tNtQrTswtLs1L10vOz93ECAzrbcd+bt7BeGlj8CFGAQ5GJR7eDk3lCCHW xLLiytxDjBIczEoivDMNgEK8KYmVValF+fFFpTmpxYcYTYGOmsgsJZqcD4y5vJJ4QxNDc0tD I2MLC3MjIyVx3pIPV8KFBNITS1KzU1MLUotg+pg4OKUaGP23KV5oY2Gf52m3jMV7bkyY9q0n kmzsedVqU/huNjpdvmaqcFvlYPA7eY2bu9P+HNzh/3rZr0St3b58d3YEq1u/1jx8P8jJdx67 a3VK4FyeRNW1Gc7ixZMvbhHac0IyNIT95qtv5W8WnGDYzFjvJ68u/2wFQxar4tfCtxFHVx/6 +bK5wt84S4mlOCPRUIu5qDgRAOG40Y+BAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161109142410eucas1p198a52c69c695e97965c968d7b899bae8 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 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: 20161109142410eucas1p198a52c69c695e97965c968d7b899bae8 X-RootMTR: 20161109142410eucas1p198a52c69c695e97965c968d7b899bae8 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 X-Virus-Scanned: ClamAV using ClamSMTP From: Ulf Hansson It's not needed to keep a local flag about the current system PM state. Let's just remove that code and the corresponding debug print. Signed-off-by: Ulf Hansson [mszyprow: rebased onto v4.9-rc4] Signed-off-by: Marek Szyprowski --- drivers/media/platform/exynos-gsc/gsc-core.c | 21 --------------------- drivers/media/platform/exynos-gsc/gsc-core.h | 3 --- 2 files changed, 24 deletions(-) diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index af6502c..4859727 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1169,20 +1169,6 @@ static int gsc_runtime_suspend(struct device *dev) #ifdef CONFIG_PM_SLEEP static int gsc_resume(struct device *dev) { - struct gsc_dev *gsc = dev_get_drvdata(dev); - unsigned long flags; - - pr_debug("gsc%d: state: 0x%lx", gsc->id, gsc->state); - - /* Do not resume if the device was idle before system suspend */ - spin_lock_irqsave(&gsc->slock, flags); - if (!test_and_clear_bit(ST_SUSPEND, &gsc->state) || - !gsc_m2m_opened(gsc)) { - spin_unlock_irqrestore(&gsc->slock, flags); - return 0; - } - spin_unlock_irqrestore(&gsc->slock, flags); - if (!pm_runtime_suspended(dev)) return gsc_runtime_resume(dev); @@ -1191,13 +1177,6 @@ static int gsc_resume(struct device *dev) static int gsc_suspend(struct device *dev) { - struct gsc_dev *gsc = dev_get_drvdata(dev); - - pr_debug("gsc%d: state: 0x%lx", gsc->id, gsc->state); - - if (test_and_set_bit(ST_SUSPEND, &gsc->state)) - return 0; - if (!pm_runtime_suspended(dev)) return gsc_runtime_suspend(dev); diff --git a/drivers/media/platform/exynos-gsc/gsc-core.h b/drivers/media/platform/exynos-gsc/gsc-core.h index 7ad7b9d..8480aec 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.h +++ b/drivers/media/platform/exynos-gsc/gsc-core.h @@ -48,9 +48,6 @@ #define GSC_CTX_ABORT (1 << 7) enum gsc_dev_flags { - /* for global */ - ST_SUSPEND, - /* for m2m node */ ST_M2M_OPEN, ST_M2M_RUN,