Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750878AbaGNEBm (ORCPT ); Mon, 14 Jul 2014 00:01:42 -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 X-AuditID: cbfee68e-b7fb96d000004bfc-f5-53c3561bac89 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/dxAg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GxbXw0zS2BF2zXQyRrpMetjrP5OaROX1K88zyxyd3e7/utpdc cGiuclXb6S1/d3dm8ZV3Lb5hZPKpxD7A/uxjufK1zMruSizFGYmGWsxFxYkAHE4jWbICAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/