Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235148
b: refs/heads/master
c: e866500
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki committed Mar 14, 2011
1 parent 0f2006b commit 097ddeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 88a6f33e4d7143f94f8e787fa4065ac873507984
refs/heads/master: e8665002477f0278f84f898145b1f141ba26ee26
10 changes: 3 additions & 7 deletions trunk/drivers/base/power/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,6 @@ static void dpm_complete(pm_message_t state)
mutex_unlock(&dpm_list_mtx);

device_complete(dev, state);
pm_runtime_put_sync(dev);

mutex_lock(&dpm_list_mtx);
put_device(dev);
Expand Down Expand Up @@ -1005,12 +1004,9 @@ static int dpm_prepare(pm_message_t state)
if (pm_runtime_barrier(dev) && device_may_wakeup(dev))
pm_wakeup_event(dev, 0);

if (pm_wakeup_pending()) {
pm_runtime_put_sync(dev);
error = -EBUSY;
} else {
error = device_prepare(dev, state);
}
pm_runtime_put_sync(dev);
error = pm_wakeup_pending() ?
-EBUSY : device_prepare(dev, state);

mutex_lock(&dpm_list_mtx);
if (error) {
Expand Down

0 comments on commit 097ddeb

Please sign in to comment.