Skip to content

Commit

Permalink
SH: cpuidle: use init/exit common routine
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Lezcano authored and Rafael J. Wysocki committed Apr 24, 2013
1 parent 1c192d0 commit b181a3b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions arch/sh/kernel/cpu/shmobile/cpuidle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
}

0 comments on commit b181a3b

Please sign in to comment.