From patchwork Mon Jul 14 03:58:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 4542431 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2CF75C0514 for ; Mon, 14 Jul 2014 04:04:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5E76D20145 for ; Mon, 14 Jul 2014 04:04:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7EF2520136 for ; Mon, 14 Jul 2014 04:04:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X6XSi-0004ja-KI; Mon, 14 Jul 2014 04:02:00 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X6XSf-0004h1-Jy for linux-arm-kernel@lists.infradead.org; Mon, 14 Jul 2014 04:01:58 +0000 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N8O00G0KOIJHC70@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 14 Jul 2014 13:01:31 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.124]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 84.71.19452.B1653C35; Mon, 14 Jul 2014 13:01:31 +0900 (KST) X-AuditID: cbfee68e-b7fb96d000004bfc-f5-53c3561bac89 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id A3.F7.05196.A1653C35; Mon, 14 Jul 2014 13:01:30 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N8O007LVOIB7D00@mmp2.samsung.com>; Mon, 14 Jul 2014 13:01:30 +0900 (KST) From: Pankaj Dubey To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RESPIN PATCH v6] ARM: EXYNOS: Move cpufreq and cpuidle device registration to init_machine Date: Mon, 14 Jul 2014 09:28:43 +0530 Message-id: <1405310323-3195-1-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPLMWRmVeSWpSXmKPExsWyRsSkRlc67HCwwYQL7BbLJt1ls/i+6wu7 Re+Cq2wWmx5fY7W4vGsOm8WM8/uYLG5f5rX4dPQ/q8WirUAV62e8ZrHoWMZocfPZdiYHHo+W 5h42j81L6j36tqxi9Pi8SS6AJYrLJiU1J7MstUjfLoErY8L0K0wFi/grzt+6xtjA+Ieni5GT Q0LARGLi+vOsELaYxIV769lAbCGBpYwSa84qwtSceniUvYuRCyg+nVHi/prnjBDOBCaJ/8sf MINUsQnoSjx5PxfMFhHIlui/vZoFpIhZ4DGjxJuVRxlBEsICaRKrmr6yg9gsAqoSvUf3gjXw CrhLLJ/8GegMDqB1ChJzJtmA9EoITGeXeD93DQtEvYDEt8mHWCBqZCU2HWCGuE5S4uCKGywT GAUXMDKsYhRNLUguKE5KLzLSK07MLS7NS9dLzs/dxAgM7NP/nvXtYLx5wPoQYzLQuInMUqLJ +cDIyCuJNzQ2M7IwNTE1NjK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S1/d3dm8ZV3Lb5hZPKpxD7A/uxjufK1zMruSizFGYmGWsxFxYkAHE4jWbICAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140713_210157_842461_4A8235A8 X-CRM114-Status: GOOD ( 11.99 ) X-Spam-Score: -5.0 (-----) Cc: kgene.kim@samsung.com, linux@arm.linux.org.uk, naushad@samsung.com, Pankaj Dubey , t.figa@samsung.com, joshi@samsung.com, thomas.ab@samsung.com, vikas.sajjan@samsung.com, chow.kim@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 As exynos_cpuidle_init and exynos_cpufreq_init function have just one lines of code for registering platform devices. We can move these lines to exynos_dt_machine_init and delete exynos_cpuidle_init and exynos_cpufreq_init function. This will help in reducing lines of code in exynos.c, making it more cleaner. Suggested-by: Tomasz Figa Signed-off-by: Pankaj Dubey Reviewed-by: Tomasz Figa --- This patch is part of exynos-cleanup series v6 [1]. Just respinning after resolving merge conflicts on latest kgene/for-next. [1]: https://lkml.org/lkml/2014/7/10/338 arch/arm/mach-exynos/exynos.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 2a43a17..99dc5aa 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -175,17 +175,6 @@ static struct platform_device exynos_cpuidle = { .id = -1, }; -void __init exynos_cpuidle_init(void) -{ - if (soc_is_exynos4210() || soc_is_exynos5250()) - platform_device_register(&exynos_cpuidle); -} - -void __init exynos_cpufreq_init(void) -{ - platform_device_register_simple("exynos-cpufreq", -1, NULL, 0); -} - void __iomem *sysram_base_addr; void __iomem *sysram_ns_base_addr; @@ -335,10 +324,11 @@ static void __init exynos_dt_machine_init(void) if (!IS_ENABLED(CONFIG_SMP)) exynos_sysram_init(); - if (!of_machine_is_compatible("samsung,exynos5420")) - exynos_cpuidle_init(); + if (of_machine_is_compatible("samsung,exynos4210") || + of_machine_is_compatible("samsung,exynos5250")) + platform_device_register(&exynos_cpuidle); - exynos_cpufreq_init(); + platform_device_register_simple("exynos-cpufreq", -1, NULL, 0); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); }