Message ID | 1479287098-30493-5-git-send-email-m.szyprowski@samsung.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show
Return-Path: <linux-samsung-soc-owner@kernel.org> 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 3725A6021C for <patchwork-linux-samsung-soc@patchwork.kernel.org>; Wed, 16 Nov 2016 09:05:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26A4428682 for <patchwork-linux-samsung-soc@patchwork.kernel.org>; Wed, 16 Nov 2016 09:05:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B10728EB1; Wed, 16 Nov 2016 09:05:44 +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 B8F2528682 for <patchwork-linux-samsung-soc@patchwork.kernel.org>; Wed, 16 Nov 2016 09:05:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934958AbcKPJFk (ORCPT <rfc822;patchwork-linux-samsung-soc@patchwork.kernel.org>); Wed, 16 Nov 2016 04:05:40 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:64098 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934006AbcKPJFY (ORCPT <rfc822;linux-samsung-soc@vger.kernel.org>); Wed, 16 Nov 2016 04:05:24 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGQ00GMB98W7P80@mailout2.w1.samsung.com>; Wed, 16 Nov 2016 09:05:20 +0000 (GMT) Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20161116090520eucas1p228f123339d16a01adda51ae99fa0af9b~He8xhVAeY0301103011eucas1p2W; Wed, 16 Nov 2016 09:05:20 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges4.samsung.com (EUCPMTA) with SMTP id 55.A5.28332.0512C285; Wed, 16 Nov 2016 09:05:20 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161116090519eucas1p1021f0aab03499906974608d33aeac4eb~He8w1lRKj2676426764eucas1p1P; Wed, 16 Nov 2016 09:05:19 +0000 (GMT) X-AuditID: cbfec7f4-f791c6d000006eac-58-582c21500131 Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id DB.4A.07726.5512C285; Wed, 16 Nov 2016 09:05:25 +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 <0OGQ00GDL98JU960@eusync2.samsung.com>; Wed, 16 Nov 2016 09:05:19 +0000 (GMT) From: Marek Szyprowski <m.szyprowski@samsung.com> To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski <m.szyprowski@samsung.com>, Sylwester Nawrocki <s.nawrocki@samsung.com>, Krzysztof Kozlowski <krzk@kernel.org>, Seung-Woo Kim <sw0312.kim@samsung.com>, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>, Javier Martinez Canillas <javier@osg.samsung.com>, Andrzej Hajda <a.hajda@samsung.com>, Inki Dae <inki.dae@samsung.com> Subject: [PATCH 4/9] s5p-mfc: Ensure that clock is disabled before turning power off Date: Wed, 16 Nov 2016 10:04:53 +0100 Message-id: <1479287098-30493-5-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1479287098-30493-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrEIsWRmVeSWpSXmKPExsWy7djP87oBijoRBisnslncWneO1WLjjPWs FpPuT2CxePN2DZPF+fMb2C16NmxltZhxfh+Txdojd9ktDr9pB3Inv2Rz4PLYtKqTzWNL/112 j74tqxg9Pm+SC2CJ4rJJSc3JLEst0rdL4Mr4NOs9Y8E9jopva3IbGBezdzFyckgImEh0vtvP AmGLSVy4t56ti5GLQ0hgKaPEtud9UM5nRokX/ZPgOqY/2wKVWMYocXT6SnYIp4FJYtrZiWBV bAKGEl1vu9hAbBEBJ4mFs/6CFTELPGGS+NbQxwySEBYIk1i06wFYEYuAqsTiOR1gzbwCHhL3 /l+FOkpO4uSxyawgNqeAp8STma9YQAZJCPxnk7hz/ydTFyMHkCMrsekAM0S9i8T0/1cYIWxh iVfHt0CdLSPR2XGQCcLuZ5RoatWGsGcwSpx7ywthW0scPn4RbBezAJ/EpG3TmSHG80p0tAlB mB4SS76oQFQ7SpxfsJQJ4vc5jBKLjh9knMAos4CRYRWjSGppcW56arGJXnFibnFpXrpecn7u JkZgTJ/+d/zLDsbFx6wOMQpwMCrx8C5Q144QYk0sK67MPcQowcGsJMJ7XVAnQog3JbGyKrUo P76oNCe1+BCjNAeLkjjvngVXwoUE0hNLUrNTUwtSi2CyTBycUg2M6j8tpDfEWMpLXu9v6a+t POiw+/xdk/LERWblr9Qnr3T/n6Hh9HtP+8Lf71rm+ajf91wQy8l3+/GUGB6xQM525lzRtFVr H5hMe8v3hXOizo8wiyuiAV07Ji1fU/MzwkHC5HaI/xqhtSmFWXdi1p+2l+a0WcVe29abf6W0 7pTBkx07xKvWnMpSYinOSDTUYi4qTgQAHskvH+UCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrELMWRmVeSWpSXmKPExsVy+t/xK7qhijoRBu17+C1urTvHarFxxnpW i0n3J7BYvHm7hsni/PkN7BY9G7ayWsw4v4/JYu2Ru+wWh9+0A7mTX7I5cHlsWtXJ5rGl/y67 R9+WVYwenzfJBbBEudlkpCampBYppOYl56dk5qXbKoWGuOlaKCnkJeam2ipF6PqGBCkplCXm lAJ5RgZowME5wD1YSd8uwS3j06z3jAX3OCq+rcltYFzM3sXIySEhYCIx/dkWNghbTOLCvfVA NheHkMASRomPb04wQzhNTBJf1/9lAqliEzCU6HrbBdYhIuAksXDWX3aQImaBJ0wSZ97tBysS FgiTWLTrAVgRi4CqxOI5HWDreAU8JO79v8oCsU5O4uSxyawgNqeAp8STma+A4hxA2zwklh81 ncDIu4CRYRWjSGppcW56brGhXnFibnFpXrpecn7uJkZgeG879nPzDsZLG4MPMQpwMCrx8C5Q 144QYk0sK67MPcQowcGsJMJ7XVAnQog3JbGyKrUoP76oNCe1+BCjKdBNE5mlRJPzgbGXVxJv aGJobmloZGxhYW5kpCTOW/LhSriQQHpiSWp2ampBahFMHxMHp1QDY55A3g1ZQxOut8Fb/qvK 1s01vHde2yOhb3GzszRP5dPur1p8S1PTLvyqPJUd8vbQmSX518/8U1/na1VxyvO7xQnG6dO2 857N2fRlw5unkw87WrLkeifNWHTgIt/LnDdb/i1lUYo+/+butPPeRxYxtW5607MxZTXPCbfw jYbS+2c9j7Ob2/RJdY8SS3FGoqEWc1FxIgAaLN4ZhQIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161116090519eucas1p1021f0aab03499906974608d33aeac4eb 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: 20161116090519eucas1p1021f0aab03499906974608d33aeac4eb X-RootMTR: 20161116090519eucas1p1021f0aab03499906974608d33aeac4eb References: <1479287098-30493-1-git-send-email-m.szyprowski@samsung.com> <CGME20161116090519eucas1p1021f0aab03499906974608d33aeac4eb@eucas1p1.samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: <linux-samsung-soc.vger.kernel.org> X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index a0a29194ccd1..30ceae7eabc5 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -963,11 +963,13 @@ static int s5p_mfc_release(struct file *file) mfc_debug(2, "Last instance\n"); s5p_mfc_deinit_hw(dev); del_timer_sync(&dev->watchdog_timer); + s5p_mfc_clock_off(); if (s5p_mfc_power_off() < 0) mfc_err("Power off failed\n"); + } else { + mfc_debug(2, "Shutting down clock\n"); + s5p_mfc_clock_off(); } - mfc_debug(2, "Shutting down clock\n"); - s5p_mfc_clock_off(); } if (dev) dev->ctx[ctx->num] = NULL;
Move clock disabling before turning power off. This will enable later to add calls to clk_prepare/unprepare in the s5p_mfc_power_off() function to avoid keeping clocks prepared all the time when driver is bound. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)