Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256942
b: refs/heads/master
c: b6c10c8
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki committed Jul 11, 2011
1 parent ef4ee3c commit be3eebe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 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: 6f00ff78278fd5d6ac110b6903ee042af2d6af91
refs/heads/master: b6c10c84665912985d0bf9b6ae8ce19fc4298d9f
12 changes: 11 additions & 1 deletion trunk/drivers/base/power/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ static void pm_genpd_sync_poweroff(struct generic_pm_domain *genpd)
static int pm_genpd_prepare(struct device *dev)
{
struct generic_pm_domain *genpd;
int ret;

dev_dbg(dev, "%s()\n", __func__);

Expand Down Expand Up @@ -400,7 +401,16 @@ static int pm_genpd_prepare(struct device *dev)

mutex_unlock(&genpd->lock);

return pm_generic_prepare(dev);
ret = pm_generic_prepare(dev);
if (ret) {
mutex_lock(&genpd->lock);

if (--genpd->prepared_count == 0)
genpd->suspend_power_off = false;

mutex_unlock(&genpd->lock);
}
return ret;
}

/**
Expand Down

0 comments on commit be3eebe

Please sign in to comment.