Commit 17877eb5a900f32bb5827a7b2109b6c9adff5fc3

Authored by Rafael J. Wysocki
1 parent 5063ce1571

PM / Domains: Rename GPD_STATE_WAIT_PARENT to GPD_STATE_WAIT_MASTER

Since it is now possible for a PM domain to have multiple masters
instead of one parent, rename the "wait for parent" status to reflect
the new situation.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

Showing 2 changed files with 5 additions and 5 deletions Side-by-side Diff

drivers/base/power/domain.c
... ... @@ -98,7 +98,7 @@
98 98 for (;;) {
99 99 prepare_to_wait(&genpd->status_wait_queue, &wait,
100 100 TASK_UNINTERRUPTIBLE);
101   - if (genpd->status != GPD_STATE_WAIT_PARENT)
  101 + if (genpd->status != GPD_STATE_WAIT_MASTER)
102 102 break;
103 103 mutex_unlock(&genpd->lock);
104 104  
... ... @@ -124,7 +124,7 @@
124 124 */
125 125 list_for_each_entry(link, &genpd->slave_links, slave_node) {
126 126 genpd_sd_counter_inc(link->master);
127   - genpd->status = GPD_STATE_WAIT_PARENT;
  127 + genpd->status = GPD_STATE_WAIT_MASTER;
128 128  
129 129 mutex_unlock(&genpd->lock);
130 130  
... ... @@ -258,7 +258,7 @@
258 258 */
259 259 static bool genpd_abort_poweroff(struct generic_pm_domain *genpd)
260 260 {
261   - return genpd->status == GPD_STATE_WAIT_PARENT
  261 + return genpd->status == GPD_STATE_WAIT_MASTER
262 262 || genpd->status == GPD_STATE_ACTIVE || genpd->resume_count > 0;
263 263 }
264 264  
... ... @@ -300,7 +300,7 @@
300 300 * (4) System suspend is in progress.
301 301 */
302 302 if (genpd->status == GPD_STATE_POWER_OFF
303   - || genpd->status == GPD_STATE_WAIT_PARENT
  303 + || genpd->status == GPD_STATE_WAIT_MASTER
304 304 || genpd->resume_count > 0 || genpd->prepared_count > 0)
305 305 return 0;
306 306  
include/linux/pm_domain.h
... ... @@ -13,7 +13,7 @@
13 13  
14 14 enum gpd_status {
15 15 GPD_STATE_ACTIVE = 0, /* PM domain is active */
16   - GPD_STATE_WAIT_PARENT, /* PM domain's parent is being waited for */
  16 + GPD_STATE_WAIT_MASTER, /* PM domain's master is being waited for */
17 17 GPD_STATE_BUSY, /* Something is happening to the PM domain */
18 18 GPD_STATE_REPEAT, /* Power off in progress, to be repeated */
19 19 GPD_STATE_POWER_OFF, /* PM domain is off */