Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753004AbaGGDxx (ORCPT ); Sun, 6 Jul 2014 23:53:53 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:13478 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752854AbaGGDxj (ORCPT ); Sun, 6 Jul 2014 23:53:39 -0400 X-AuditID: cbfee68f-b7fef6d000003970-2b-53ba19c1bf5c 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, chow.kim@samsung.com, Pankaj Dubey Subject: [PATCH v6 2/6] ARM: EXYNOS: Move cpufreq and cpuidle device registration to init_machine Date: Mon, 07 Jul 2014 09:20:52 +0530 Message-id: <1404705056-11965-3-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1404705056-11965-1-git-send-email-pankaj.dubey@samsung.com> References: <1404705056-11965-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphkeLIzCtJLcpLzFFi42JZI2JSo3tQclewwYPnshbLJt1ls/i+6wu7 Re+Cq2wWmx5fY7W4vGsOm8WM8/uYLG5f5rX4dPQ/q8WirUAV62e8ZrG4+Ww7kwO3R0tzD5vH 5iX1Hn1bVjF6fN4kF8ASxWWTkpqTWZZapG+XwJVxcPJmtoLXvBU7Jx5ga2B8yN3FyMkhIWAi MaXjLTOELSZx4d56ti5GLg4hgaWMEitOz2GCKXq5cTM7RGI6o8Tus/dZIZwJTBJPei+xgFSx CehKPHk/F2yUiEC2RP/t1SwgRcwCpxglZm+exg6SEBZIlni1bT+YzSKgKjHx81E2EJtXwEPi 17uXQHEOoHUKEnMm2YCEOQU8JZZ8mAQ2Uwio5O65Q4wgM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QWgTTx8TBKdXAaOj/iaf97YYHTcm+z+V3mr/7uk7eYOPtwCzbZPFcTf6a JZVzLj9y75gT8cY1uSTr8fTKL3YninalZarYvZJfnu8Z7vk2Ti0q8vPU6PfKTX5zHr37dHjS NuWYUMbf1z4fuCwRdZJR4uSZtt8/nhwQ7vq195JEblva/Znqlg6z55lEn8u8d6xxvxJLcUai oRZzUXEiAElY1iXGAgAA 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 --- arch/arm/mach-exynos/exynos.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index ff60b4c..47170eb 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -171,19 +171,6 @@ static struct platform_device exynos_cpuidle = { .id = -1, }; -void __init exynos_cpuidle_init(void) -{ - if (soc_is_exynos5440()) - return; - - 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; @@ -300,10 +287,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,exynos5420") || + !of_machine_is_compatible("samsung,exynos5440")) + 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/