aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2013-04-23 10:41:16 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-26 07:34:02 -0400
commit9fe3d35a32a9be259435e30fdca680cb78bd6d6f (patch)
tree793ac39b13256c694c931607b540f6fdf0f3cb99 /arch/arm/mach-s3c64xx
parentb181a3b03f866776211f22390c185c4da1dc45ff (diff)
ARM: s3c64xx: cpuidle: use init/exit common routine
Remove the duplicated code and use the cpuidle common code for initialization. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch/arm/mach-s3c64xx')
-rw-r--r--arch/arm/mach-s3c64xx/cpuidle.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/arch/arm/mach-s3c64xx/cpuidle.c b/arch/arm/mach-s3c64xx/cpuidle.c
index 852ff16189f7..3c8ab07c2012 100644
--- a/arch/arm/mach-s3c64xx/cpuidle.c
+++ b/arch/arm/mach-s3c64xx/cpuidle.c
@@ -40,8 +40,6 @@ static int s3c64xx_enter_idle(struct cpuidle_device *dev,
40 return index; 40 return index;
41} 41}
42 42
43static DEFINE_PER_CPU(struct cpuidle_device, s3c64xx_cpuidle_device);
44
45static struct cpuidle_driver s3c64xx_cpuidle_driver = { 43static struct cpuidle_driver s3c64xx_cpuidle_driver = {
46 .name = "s3c64xx_cpuidle", 44 .name = "s3c64xx_cpuidle",
47 .owner = THIS_MODULE, 45 .owner = THIS_MODULE,
@@ -60,16 +58,6 @@ static struct cpuidle_driver s3c64xx_cpuidle_driver = {
60 58
61static int __init s3c64xx_init_cpuidle(void) 59static int __init s3c64xx_init_cpuidle(void)
62{ 60{
63 int ret; 61 return cpuidle_register(&s3c64xx_cpuidle_driver, NULL);
64
65 cpuidle_register_driver(&s3c64xx_cpuidle_driver);
66
67 ret = cpuidle_register_device(&s3c64xx_cpuidle_device);
68 if (ret) {
69 pr_err("Failed to register cpuidle device: %d\n", ret);
70 return ret;
71 }
72
73 return 0;
74} 62}
75device_initcall(s3c64xx_init_cpuidle); 63device_initcall(s3c64xx_init_cpuidle);