aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2013-04-23 10:41:17 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-24 07:58:32 -0400
commitb181a3b03f866776211f22390c185c4da1dc45ff (patch)
treebdde636a5dfa9189807b0a96d65c160d77411b01 /arch/sh
parent1c192d047a0ddc8e25a8b8f43c80c93330bdf929 (diff)
SH: 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: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/kernel/cpu/shmobile/cpuidle.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c
index fdfe57f42b8c..d30622592116 100644
--- a/arch/sh/kernel/cpu/shmobile/cpuidle.c
+++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c
@@ -51,7 +51,6 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev,
51 return k; 51 return k;
52} 52}
53 53
54static struct cpuidle_device cpuidle_dev;
55static struct cpuidle_driver cpuidle_driver = { 54static struct cpuidle_driver cpuidle_driver = {
56 .name = "sh_idle", 55 .name = "sh_idle",
57 .owner = THIS_MODULE, 56 .owner = THIS_MODULE,
@@ -100,9 +99,5 @@ int __init sh_mobile_setup_cpuidle(void)
100 if (sh_mobile_sleep_supported & SUSP_SH_STANDBY) 99 if (sh_mobile_sleep_supported & SUSP_SH_STANDBY)
101 cpuidle_driver.states[2].disabled = false; 100 cpuidle_driver.states[2].disabled = false;
102 101
103 ret = cpuidle_register_driver(&cpuidle_driver); 102 return cpuidle_register(&cpuidle_driver);
104 if (ret)
105 return ret;
106
107 return cpuidle_register_device(&cpuidle_dev);
108} 103}