summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-09-24 15:30:55 +0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-09-24 15:30:55 +0400
commit071f58279f274f749c4109aef86d899766014139 (patch)
tree028e8da9404d88c8deb8d969233f85b2ff883cd0 /drivers/base
parentc26d4114aac55b57078caf83e261621d22e4596d (diff)
parent6f3c77b040fc24708228607bba504878de5236d1 (diff)
downloadlinux-071f58279f274f749c4109aef86d899766014139.tar.xz
Merge branch 'pm-runtime'
* pm-runtime: PM / Runtime: let rpm_resume() succeed if RPM_ACTIVE, even when disabled, v2
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/runtime.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index 7d9c1cb1c39a..3148b10dc2e5 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -509,6 +509,9 @@ static int rpm_resume(struct device *dev, int rpmflags)
repeat:
if (dev->power.runtime_error)
retval = -EINVAL;
+ else if (dev->power.disable_depth == 1 && dev->power.is_suspended
+ && dev->power.runtime_status == RPM_ACTIVE)
+ retval = 1;
else if (dev->power.disable_depth > 0)
retval = -EACCES;
if (retval)