Commit b181a3b0 authored by Daniel Lezcano's avatar Daniel Lezcano Committed by Rafael J. Wysocki

SH: cpuidle: use init/exit common routine

Remove the duplicated code and use the cpuidle common code for initialization.
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: default avatarSimon Horman <horms+renesas@verge.net.au>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 1c192d04
...@@ -51,7 +51,6 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev, ...@@ -51,7 +51,6 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev,
return k; return k;
} }
static struct cpuidle_device cpuidle_dev;
static struct cpuidle_driver cpuidle_driver = { static struct cpuidle_driver cpuidle_driver = {
.name = "sh_idle", .name = "sh_idle",
.owner = THIS_MODULE, .owner = THIS_MODULE,
...@@ -100,9 +99,5 @@ int __init sh_mobile_setup_cpuidle(void) ...@@ -100,9 +99,5 @@ int __init sh_mobile_setup_cpuidle(void)
if (sh_mobile_sleep_supported & SUSP_SH_STANDBY) if (sh_mobile_sleep_supported & SUSP_SH_STANDBY)
cpuidle_driver.states[2].disabled = false; cpuidle_driver.states[2].disabled = false;
ret = cpuidle_register_driver(&cpuidle_driver); return cpuidle_register(&cpuidle_driver);
if (ret)
return ret;
return cpuidle_register_device(&cpuidle_dev);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment