diff options
author | Pankaj Dubey <pankaj.dubey@samsung.com> | 2014-07-19 03:48:35 +0900 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-07-23 08:20:38 +0900 |
commit | 6887d9e5682886b5d9fe81217ff2f1410724cdb9 (patch) | |
tree | 5ad390a066ee8eab0ade3dc76d375eaaebf9f8ed | |
parent | 2e94ac42898f84d76e3c21dd91bcd1c51c920dff (diff) | |
download | op-kernel-dev-6887d9e5682886b5d9fe81217ff2f1410724cdb9.zip op-kernel-dev-6887d9e5682886b5d9fe81217ff2f1410724cdb9.tar.gz |
ARM: EXYNOS: Move cpufreq and cpuidle device registration to init_machine
As exynos_cpuidle_init() and exynos_cpufreq_init() functions have just
one line of code for registering platform devices. So we can move them
to exynos_dt_machine_init() and remove exynos_cpuidle_init() and
exynos_cpufreq_init(). This will help in reducing lines of code in
exynos.c, making it more clean.
Suggested-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r-- | arch/arm/mach-exynos/exynos.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 5eaf878..df41bd1 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -165,17 +165,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; @@ -325,10 +314,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); } |