Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282121
b: refs/heads/master
c: e90b1e5
h: refs/heads/master
i:
  282119: 23514fb
v: v3
  • Loading branch information
Lin Ming authored and Jeff Garzik committed Jan 9, 2012
1 parent 423770d commit abda111
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 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: 28fd00d42cca178638f51c08efa986a777c24a4b
refs/heads/master: e90b1e5a6e04c8892007ff8db20ef6d4fbdb5402
18 changes: 16 additions & 2 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5298,7 +5298,7 @@ static int ata_port_suspend(struct device *dev)
return ata_port_suspend_common(dev);
}

static int ata_port_resume(struct device *dev)
static int ata_port_resume_common(struct device *dev)
{
struct ata_port *ap = to_ata_port(dev);
int rc;
Expand All @@ -5308,6 +5308,20 @@ static int ata_port_resume(struct device *dev)
return rc;
}

static int ata_port_resume(struct device *dev)
{
int rc;

rc = ata_port_resume_common(dev);
if (!rc) {
pm_runtime_disable(dev);
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
}

return rc;
}

static int ata_port_runtime_idle(struct device *dev)
{
return pm_runtime_suspend(dev);
Expand All @@ -5318,7 +5332,7 @@ static const struct dev_pm_ops ata_port_pm_ops = {
.resume = ata_port_resume,

.runtime_suspend = ata_port_suspend_common,
.runtime_resume = ata_port_resume,
.runtime_resume = ata_port_resume_common,
.runtime_idle = ata_port_runtime_idle,
};

Expand Down

0 comments on commit abda111

Please sign in to comment.