Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256947
b: refs/heads/master
c: 56375fd
h: refs/heads/master
i:
  256945: c275878
  256943: ed319db
v: v3
  • Loading branch information
Rafael J. Wysocki committed Jul 11, 2011
1 parent 0057595 commit 694711b
Show file tree
Hide file tree
Showing 2 changed files with 15 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: 4ecd6e651dd25ebbf0cc53c68162c0ab08641725
refs/heads/master: 56375fd420f851944960bd53dbb08d674f4d9406
15 changes: 14 additions & 1 deletion trunk/drivers/base/power/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,19 @@ static bool genpd_abort_poweroff(struct generic_pm_domain *genpd)
return genpd->status == GPD_STATE_ACTIVE || genpd->resume_count > 0;
}

/**
* genpd_queue_power_off_work - Queue up the execution of pm_genpd_poweroff().
* @genpd: PM domait to power off.
*
* Queue up the execution of pm_genpd_poweroff() unless it's already been done
* before.
*/
static void genpd_queue_power_off_work(struct generic_pm_domain *genpd)
{
if (!work_pending(&genpd->power_off_work))
queue_work(pm_wq, &genpd->power_off_work);
}

/**
* pm_genpd_poweroff - Remove power from a given PM domain.
* @genpd: PM domain to power down.
Expand Down Expand Up @@ -304,7 +317,7 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd)
if (parent) {
genpd_sd_counter_dec(parent);
if (parent->sd_count == 0)
queue_work(pm_wq, &parent->power_off_work);
genpd_queue_power_off_work(parent);

genpd_release_lock(parent);
}
Expand Down

0 comments on commit 694711b

Please sign in to comment.