summaryrefslogtreecommitdiff
path: root/drivers/base/power/main.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-10-22 00:21:52 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2011-10-22 00:21:52 +0200
commitd033e078566faed8c8f59baf97ee57ce2524ef5c (patch)
tree46a98bf6a555ecbc8178baf6dd3a81553c3c3654 /drivers/base/power/main.c
parent081a9d043c983f161b78fdc4671324d1342b86bc (diff)
parent382414b93ac1e8ee7693be710e60c83eacc97c6f (diff)
Merge branch 'pm-domains' into pm-for-linus
* pm-domains: ARM: mach-shmobile: sh7372 A4R support (v4) ARM: mach-shmobile: sh7372 A3SP support (v4) PM / Sleep: Mark devices involved in wakeup signaling during suspend
Diffstat (limited to 'drivers/base/power/main.c')
-rw-r--r--drivers/base/power/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index b1b58260b4ff..59f8ab235486 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -917,7 +917,11 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
}
End:
- dev->power.is_suspended = !error;
+ if (!error) {
+ dev->power.is_suspended = true;
+ if (dev->power.wakeup_path && dev->parent)
+ dev->parent->power.wakeup_path = true;
+ }
device_unlock(dev);
complete_all(&dev->power.completion);
@@ -1020,6 +1024,8 @@ static int device_prepare(struct device *dev, pm_message_t state)
device_lock(dev);
+ dev->power.wakeup_path = device_may_wakeup(dev);
+
if (dev->pm_domain) {
pm_dev_dbg(dev, state, "preparing power domain ");
if (dev->pm_domain->ops.prepare)