]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PM / Domains: Rename GPD_STATE_WAIT_PARENT to GPD_STATE_WAIT_MASTER
authorRafael J. Wysocki <rjw@sisk.pl>
Mon, 8 Aug 2011 21:43:50 +0000 (23:43 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Thu, 25 Aug 2011 13:33:45 +0000 (15:33 +0200)
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>
drivers/base/power/domain.c
include/linux/pm_domain.h

index 8fc538da1de022814ca927070f07fdad59d7a56e..c06f8f8717b9d8de2c332310c28194368d34aa05 100644 (file)
@@ -98,7 +98,7 @@ int __pm_genpd_poweron(struct generic_pm_domain *genpd)
        for (;;) {
                prepare_to_wait(&genpd->status_wait_queue, &wait,
                                TASK_UNINTERRUPTIBLE);
-               if (genpd->status != GPD_STATE_WAIT_PARENT)
+               if (genpd->status != GPD_STATE_WAIT_MASTER)
                        break;
                mutex_unlock(&genpd->lock);
 
@@ -124,7 +124,7 @@ int __pm_genpd_poweron(struct generic_pm_domain *genpd)
         */
        list_for_each_entry(link, &genpd->slave_links, slave_node) {
                genpd_sd_counter_inc(link->master);
-               genpd->status = GPD_STATE_WAIT_PARENT;
+               genpd->status = GPD_STATE_WAIT_MASTER;
 
                mutex_unlock(&genpd->lock);
 
@@ -258,7 +258,7 @@ static void __pm_genpd_restore_device(struct dev_list_entry *dle,
  */
 static bool genpd_abort_poweroff(struct generic_pm_domain *genpd)
 {
-       return genpd->status == GPD_STATE_WAIT_PARENT
+       return genpd->status == GPD_STATE_WAIT_MASTER
                || genpd->status == GPD_STATE_ACTIVE || genpd->resume_count > 0;
 }
 
@@ -300,7 +300,7 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd)
         * (4) System suspend is in progress.
         */
        if (genpd->status == GPD_STATE_POWER_OFF
-           || genpd->status == GPD_STATE_WAIT_PARENT
+           || genpd->status == GPD_STATE_WAIT_MASTER
            || genpd->resume_count > 0 || genpd->prepared_count > 0)
                return 0;
 
index 5f5154d792533a2437ef5d8fe532d7b59698ba94..bf679f59f9a85fd617482b2897644c3f03113150 100644 (file)
@@ -13,7 +13,7 @@
 
 enum gpd_status {
        GPD_STATE_ACTIVE = 0,   /* PM domain is active */
-       GPD_STATE_WAIT_PARENT,  /* PM domain's parent is being waited for */
+       GPD_STATE_WAIT_MASTER,  /* PM domain's master is being waited for */
        GPD_STATE_BUSY,         /* Something is happening to the PM domain */
        GPD_STATE_REPEAT,       /* Power off in progress, to be repeated */
        GPD_STATE_POWER_OFF,    /* PM domain is off */