diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-03 21:54:15 -1000 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-03 21:54:15 -1000 |
commit | 35e51fe82ddcd8fb7f129d6dd8491c097d388665 (patch) | |
tree | d6dd5e860c0e68a1af7976990c7d624e7362415d /drivers/cpuidle/driver.c | |
parent | c0c770e610cc4cdcd66c7e939bdf89cc3e72f79d (diff) | |
parent | a0bfa1373859e9d11dc92561a8667588803e42d8 (diff) | |
download | talos-op-linux-35e51fe82ddcd8fb7f129d6dd8491c097d388665.tar.gz talos-op-linux-35e51fe82ddcd8fb7f129d6dd8491c097d388665.zip |
Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6
* 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
cpuidle: stop depending on pm_idle
x86 idle: move mwait_idle_with_hints() to where it is used
cpuidle: replace xen access to x86 pm_idle and default_idle
cpuidle: create bootparam "cpuidle.off=1"
mrst_pmu: driver for Intel Moorestown Power Management Unit
Diffstat (limited to 'drivers/cpuidle/driver.c')
-rw-r--r-- | drivers/cpuidle/driver.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c index fd1601e3d125..3f7e3cedd133 100644 --- a/drivers/cpuidle/driver.c +++ b/drivers/cpuidle/driver.c @@ -26,6 +26,9 @@ int cpuidle_register_driver(struct cpuidle_driver *drv) if (!drv) return -EINVAL; + if (cpuidle_disabled()) + return -ENODEV; + spin_lock(&cpuidle_driver_lock); if (cpuidle_curr_driver) { spin_unlock(&cpuidle_driver_lock); |