]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - drivers/base/power/domain.c
Merge branch 'pm-qos'
[~shefty/rdma-dev.git] / drivers / base / power / domain.c
index 96b71b6536d61cef381dab119533b4a0b13f542e..acc3a8ded29d0e45d704f6f3ecef261e70e6a5c2 100644 (file)
@@ -470,10 +470,19 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd)
                return -EBUSY;
 
        not_suspended = 0;
-       list_for_each_entry(pdd, &genpd->dev_list, list_node)
+       list_for_each_entry(pdd, &genpd->dev_list, list_node) {
+               enum pm_qos_flags_status stat;
+
+               stat = dev_pm_qos_flags(pdd->dev,
+                                       PM_QOS_FLAG_NO_POWER_OFF
+                                               | PM_QOS_FLAG_REMOTE_WAKEUP);
+               if (stat > PM_QOS_FLAGS_NONE)
+                       return -EBUSY;
+
                if (pdd->dev->driver && (!pm_runtime_suspended(pdd->dev)
                    || pdd->dev->power.irq_safe))
                        not_suspended++;
+       }
 
        if (not_suspended > genpd->in_progress)
                return -EBUSY;