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: 4542411 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 8216EC0514 for ; Mon, 14 Jul 2014 04:01:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AFB0820149 for ; Mon, 14 Jul 2014 04:01:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4499D20136 for ; Mon, 14 Jul 2014 04:01:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750721AbaGNEBe (ORCPT ); Mon, 14 Jul 2014 00:01:34 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:12546 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750703AbaGNEBd (ORCPT ); Mon, 14 Jul 2014 00:01:33 -0400 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>; 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 Cc: kgene.kim@samsung.com, linux@arm.linux.org.uk, t.figa@samsung.com, vikas.sajjan@samsung.com, joshi@samsung.com, naushad@samsung.com, thomas.ab@samsung.com, chow.kim@samsung.com, Pankaj Dubey 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 +cDIyCuJNzQ2M7IwNTE1NjK3NCNN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dm8ZV3Lb5hZPKpxD7A/uxjufK1zMruSizFGYmGWsxFxYkAHE4jWbICAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 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 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); }