From patchwork Tue Nov 17 06:05:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 7633311 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0328BBF90C for ; Tue, 17 Nov 2015 06:14:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2455D2042A for ; Tue, 17 Nov 2015 06:14:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2AECD20525 for ; Tue, 17 Nov 2015 06:14:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751465AbbKQGOU (ORCPT ); Tue, 17 Nov 2015 01:14:20 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:56081 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbbKQGOS (ORCPT ); Tue, 17 Nov 2015 01:14:18 -0500 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NXY00AMW3ZQRG30@mailout2.samsung.com>; Tue, 17 Nov 2015 15:14:14 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [172.20.52.123]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id F0.B0.05272.6B5CA465; Tue, 17 Nov 2015 15:14:14 +0900 (KST) X-AuditID: cbfee68e-f791c6d000001498-e3-564ac5b63d2f Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 58.12.23663.5B5CA465; Tue, 17 Nov 2015 15:14:14 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NXY00GBB3PUDS00@mmp2.samsung.com>; Tue, 17 Nov 2015 15:14:13 +0900 (KST) From: Pankaj Dubey To: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Cc: kgene.kim@samsung.com, k.kozlowski@samsung.com, thomas.ab@samsung.com, amitdanielk@gmail.com, olof@lixom.net, khilman@linaro.org, arnd@arndb.de, Pankaj Dubey Subject: [PATCH v6 8/9] ARM: EXYNOS: rearrange static and non-static functions of PMU driver Date: Tue, 17 Nov 2015 11:35:50 +0530 Message-id: <1447740351-14246-9-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 2.4.5 In-reply-to: <1447740351-14246-1-git-send-email-pankaj.dubey@samsung.com> References: <1447740351-14246-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrDLMWRmVeSWpSXmKPExsWyRsSkWnfbUa8wg2PbBCw+rn7JZvF30jF2 i9cvDC16F1xls/h6eAWjxabH11gtLu+aw2bxufcIo8WM8/uYLE5d/8xmsWjrF3aLjmWMDjwe v39NYvTYOesuu8eda3vYPDYvqfe4cqKJ1aNvyypGj8+b5ALYo7hsUlJzMstSi/TtErgyvrQf Zi3YzVcx9eYLtgbG/9xdjJwcEgImErsmvmaBsMUkLtxbz9bFyMUhJLCCUWLz1ofMMEW7d7xl h0jMYpS4tWU6M4TTyiTx+kkvK0gVm4CuxJP3c8ESIgKtjBLL9v9nAnGYBQ4wSuxY94oRpEpY IE7i3rsHYAtZBFQl2rctAIvzCnhIPLv5DMjmANonJ7G0uRYkzCngKbFj6REmkLAQUMm7E+og IyUELrFLLF09iw1ijIDEt8mHWCBaZSU2HYC6WlLi4IobLBMYhRcwMqxiFE0t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cEo1MF4UZThd9uxj zO6lM5K+Xgpae8c+4Z3meau1cw10XdbxXD4SUFr37R77nfVn1+rPb/h2dnnxxgzJyG9/RLXV /rIpHDp8lq873/GC8Xm2yQ5nHPyPrcyJb3g4Ky4rwG+ByRxOK8spQi4/2woW67dtsT98Qod5 xcFT3z4H/D61180qiyVC0FIpYq4SS3FGoqEWc1FxIgBLWKHt3AIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch moves exynos_sys_powerdown_conf function above all static functions, to avoid confusion causing due to mixing of static-nonstatic-static functions and to improve readability of this driver. Signed-off-by: Pankaj Dubey Suggested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski --- arch/arm/mach-exynos/pmu.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c index 01cb649..a7741d4 100644 --- a/arch/arm/mach-exynos/pmu.c +++ b/arch/arm/mach-exynos/pmu.c @@ -39,23 +39,6 @@ u32 pmu_raw_readl(u32 offset) return readl_relaxed(pmu_base_addr + offset); } -static void exynos_power_off(void) -{ - unsigned int tmp; - - pr_info("Power down.\n"); - tmp = pmu_raw_readl(EXYNOS_PS_HOLD_CONTROL); - tmp ^= (1 << 8); - pmu_raw_writel(tmp, EXYNOS_PS_HOLD_CONTROL); - - /* Wait a little so we don't give a false warning below */ - mdelay(100); - - pr_err("Power down failed, please power off system manually.\n"); - while (1) - ; -} - void exynos_sys_powerdown_conf(enum sys_powerdown mode) { unsigned int i; @@ -85,6 +68,23 @@ void exynos_sys_powerdown_conf(enum sys_powerdown mode) } } +static void exynos_power_off(void) +{ + unsigned int tmp; + + pr_info("Power down.\n"); + tmp = pmu_raw_readl(EXYNOS_PS_HOLD_CONTROL); + tmp ^= (1 << 8); + pmu_raw_writel(tmp, EXYNOS_PS_HOLD_CONTROL); + + /* Wait a little so we don't give a false warning below */ + mdelay(100); + + pr_err("Power down failed, please power off system manually.\n"); + while (1) + ; +} + static int pmu_restart_notify(struct notifier_block *this, unsigned long code, void *unused) {