summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-27 23:32:49 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-27 23:32:49 +0300
commitb17b849946e581ad58af74933d4fb63ad8812937 (patch)
tree6319a8785faab60cd3f6f9e76b8b8ba733533763
parent785eb10b9f1cf1a1b9e3bb5175da04dc0ffba553 (diff)
parentc3810c88788d505d4ffd786addd111b745e42161 (diff)
downloadlinux-b17b849946e581ad58af74933d4fb63ad8812937.tar.xz
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: PM / Runtime: Don't enable interrupts while running in_interrupt
-rw-r--r--drivers/base/power/runtime.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index 656493a5e073..42615b419dfb 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -407,12 +407,15 @@ static int rpm_suspend(struct device *dev, int rpmflags)
goto out;
}
+ /* Maybe the parent is now able to suspend. */
if (parent && !parent->power.ignore_children && !dev->power.irq_safe) {
- spin_unlock_irq(&dev->power.lock);
+ spin_unlock(&dev->power.lock);
- pm_request_idle(parent);
+ spin_lock(&parent->power.lock);
+ rpm_idle(parent, RPM_ASYNC);
+ spin_unlock(&parent->power.lock);
- spin_lock_irq(&dev->power.lock);
+ spin_lock(&dev->power.lock);
}
out: