summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-01-15 01:46:25 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-01-15 17:21:19 +0100
commit1f5c6855260141ac3115e9a065491ee2ac07f9bc (patch)
treeab0ab3f9402da055ed0f56d6c23dfbe9cd715c96 /drivers/base
parent4918e1f87c5fb7fc8f73a7d8fb118beeb94e05f7 (diff)
PM / runtime: Check ignore_children in pm_runtime_need_not_resume()
Modify pm_runtime_need_not_resume() to make it avoid taking power.child_count for devices with power.ignore_children which is consistent with the runtime PM usage of these fields. Suggested-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/runtime.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index 84832f1a75bf..cb5e48b86453 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -1616,7 +1616,8 @@ void pm_runtime_drop_link(struct device *dev)
static bool pm_runtime_need_not_resume(struct device *dev)
{
return atomic_read(&dev->power.usage_count) <= 1 &&
- atomic_read(&dev->power.child_count) == 0;
+ (atomic_read(&dev->power.child_count) == 0 ||
+ dev->power.ignore_children);
}
/**