diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2014-05-09 06:43:26 +0900 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-05-26 05:21:06 +0900 |
commit | 043c86b6f2d54cfee8ec67e1f7f49156a68b2bd2 (patch) | |
tree | 447cfd1bb06e6c0d2d73c4dda753bb0c71e2bc80 /arch/arm/mach-exynos/cpuidle.c | |
parent | 53af16a1a8d6776b19747291b39f0d4cbda42d92 (diff) | |
download | lwn-043c86b6f2d54cfee8ec67e1f7f49156a68b2bd2.tar.gz lwn-043c86b6f2d54cfee8ec67e1f7f49156a68b2bd2.zip |
ARM: EXYNOS: Use cpuidle_register
Use the cpuidle generic function 'cpuidle_register'. That saves us
from some extra lines of code and unneeded variables.
A side effect of this change is a bug fix where before the cpuidle
driver was registered for each_online_cpu and now it is for
each_possible_cpu.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos/cpuidle.c')
-rw-r--r-- | arch/arm/mach-exynos/cpuidle.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index 56780c64a620..0093d369f099 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -41,8 +41,6 @@ #define S5P_CHECK_AFTR 0xFCBA0D10 -static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device); - /* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */ static void exynos4_set_wakeupmask(void) { @@ -161,29 +159,17 @@ static struct cpuidle_driver exynos4_idle_driver = { static int exynos_cpuidle_probe(struct platform_device *pdev) { - int cpu_id, ret; - struct cpuidle_device *device; + int ret; if (soc_is_exynos5440()) exynos4_idle_driver.state_count = 1; - ret = cpuidle_register_driver(&exynos4_idle_driver); + ret = cpuidle_register(&exynos4_idle_driver, NULL); if (ret) { dev_err(&pdev->dev, "failed to register cpuidle driver\n"); return ret; } - for_each_online_cpu(cpu_id) { - device = &per_cpu(exynos4_cpuidle_device, cpu_id); - device->cpu = cpu_id; - - ret = cpuidle_register_device(device); - if (ret) { - dev_err(&pdev->dev, "failed to register cpuidle device\n"); - return ret; - } - } - return 0; } |