Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316818
b: refs/heads/master
c: 33a2285
h: refs/heads/master
v: v3
  • Loading branch information
Lin Ming authored and James Bottomley committed Jul 20, 2012
1 parent 6158797 commit 55580f7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 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: 4bdd03e61b7a5c4c6bc2b25d46fcd491788fdfb3
refs/heads/master: 33a2285d96b5e7b9500612ec623bf4313397bb53
23 changes: 12 additions & 11 deletions trunk/drivers/scsi/scsi_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,24 @@ static int scsi_bus_resume_common(struct device *dev)
{
int err = 0;

if (scsi_is_sdev_device(dev)) {
/*
* Parent device may have runtime suspended as soon as
* it is woken up during the system resume.
*
* Resume it on behalf of child.
*/
pm_runtime_get_sync(dev->parent);
err = scsi_dev_type_resume(dev);
pm_runtime_put_sync(dev->parent);
}
/*
* Parent device may have runtime suspended as soon as
* it is woken up during the system resume.
*
* Resume it on behalf of child.
*/
pm_runtime_get_sync(dev->parent);

if (scsi_is_sdev_device(dev))
err = scsi_dev_type_resume(dev);
if (err == 0) {
pm_runtime_disable(dev);
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
}

pm_runtime_put_sync(dev->parent);

return err;
}

Expand Down

0 comments on commit 55580f7

Please sign in to comment.