diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-09-24 13:30:55 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-09-24 13:30:55 +0200 |
commit | 071f58279f274f749c4109aef86d899766014139 (patch) | |
tree | 028e8da9404d88c8deb8d969233f85b2ff883cd0 /drivers/base | |
parent | c26d4114aac55b57078caf83e261621d22e4596d (diff) | |
parent | 6f3c77b040fc24708228607bba504878de5236d1 (diff) |
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.c | 3 |
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) |