SH: cpuidle: use init/exit common routine
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 23 Apr 2013 14:41:17 +0000 (14:41 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 24 Apr 2013 11:58:32 +0000 (13:58 +0200)
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>
arch/sh/kernel/cpu/shmobile/cpuidle.c

index fdfe57f42b8c21407e59855d2b18af13d438af07..d3062259211679218c288b7cebd88517737c1482 100644 (file)
@@ -51,7 +51,6 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev,
        return k;
 }
 
-static struct cpuidle_device cpuidle_dev;
 static struct cpuidle_driver cpuidle_driver = {
        .name   = "sh_idle",
        .owner  = THIS_MODULE,
@@ -100,9 +99,5 @@ int __init sh_mobile_setup_cpuidle(void)
        if (sh_mobile_sleep_supported & SUSP_SH_STANDBY)
                cpuidle_driver.states[2].disabled = false;
 
-       ret = cpuidle_register_driver(&cpuidle_driver);
-       if (ret)
-               return ret;
-
-       return cpuidle_register_device(&cpuidle_dev);
+       return cpuidle_register(&cpuidle_driver);
 }
This page took 0.02958 seconds and 5 git commands to generate.