summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-03-28 22:59:13 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2012-03-28 22:59:13 +0200
commit9a4768d849d28a79566aa37de19b9852d2da8ec4 (patch)
tree155e2cb41e8f12081feefed705a7012d77889e9b /drivers/base
parentMerge tag 'common-clk-api' of git://git.kernel.org/pub/scm/linux/kernel/git/a... (diff)
parentPM / Runtime: don't forget to wake up waitqueue on failure (diff)
downloadlinux-9a4768d849d28a79566aa37de19b9852d2da8ec4.tar.xz
linux-9a4768d849d28a79566aa37de19b9852d2da8ec4.zip
Merge branch 'pm-runtime' into linux-next
* pm-runtime: PM / Runtime: don't forget to wake up waitqueue on failure
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/runtime.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index 541f821d4ea6..bd0f3949bcf9 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -532,6 +532,8 @@ static int rpm_suspend(struct device *dev, int rpmflags)
dev->power.suspend_time = ktime_set(0, 0);
dev->power.max_time_suspended_ns = -1;
dev->power.deferred_resume = false;
+ wake_up_all(&dev->power.wait_queue);
+
if (retval == -EAGAIN || retval == -EBUSY) {
dev->power.runtime_error = 0;
@@ -547,7 +549,6 @@ static int rpm_suspend(struct device *dev, int rpmflags)
} else {
pm_runtime_cancel_pending(dev);
}
- wake_up_all(&dev->power.wait_queue);
goto out;
}