summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-06 19:56:04 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-06 19:56:04 -0700
commitf21fec96ead90eae7bcb3c847e8115c119c5dc62 (patch)
treed60a74cc16aab57f5c8a4a496f0c6e9f33848d45 /drivers
parenta0421da44fc8dcb94aad8889dae285f7ee923f80 (diff)
parenteeaab2d8af2cf1d36d7086f22e9de42d6dd2995c (diff)
downloadlinux-f21fec96ead90eae7bcb3c847e8115c119c5dc62.tar.gz
linux-f21fec96ead90eae7bcb3c847e8115c119c5dc62.tar.bz2
linux-f21fec96ead90eae7bcb3c847e8115c119c5dc62.zip
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull ACPI & Power Management patches from Len Brown: "Two fixes for cpuidle merge-window changes, plus a URL fix in MAINTAINERS" * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: MAINTAINERS: Update git url for ACPI cpuidle: Fix panic in CPU off-lining with no idle driver ACPI processor: Use safe_halt() rather than halt() in acpi_idle_play_dead()
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/processor_idle.c2
-rw-r--r--drivers/cpuidle/cpuidle.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index b3447f63e46b..f3decb30223f 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -786,7 +786,7 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index)
while (1) {
if (cx->entry_method == ACPI_CSTATE_HALT)
- halt();
+ safe_halt();
else if (cx->entry_method == ACPI_CSTATE_SYSTEMIO) {
inb(cx->address);
/* See comment in acpi_idle_do_entry() */
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 87411cebc577..2f0083a51a9a 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -74,7 +74,7 @@ static cpuidle_enter_t cpuidle_enter_ops;
/**
* cpuidle_play_dead - cpu off-lining
*
- * Only returns in case of an error
+ * Returns in case of an error or no driver
*/
int cpuidle_play_dead(void)
{
@@ -83,6 +83,9 @@ int cpuidle_play_dead(void)
int i, dead_state = -1;
int power_usage = -1;
+ if (!drv)
+ return -ENODEV;
+
/* Find lowest-power state that supports long-term idle */
for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++) {
struct cpuidle_state *s = &drv->states[i];