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 | Merge branch 'pm-qos' (diff) | |
parent | PM / Runtime: let rpm_resume() succeed if RPM_ACTIVE, even when disabled, v2 (diff) | |
download | linux-071f58279f274f749c4109aef86d899766014139.tar.xz linux-071f58279f274f749c4109aef86d899766014139.zip |
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) |