Skip to content

Commit

Permalink
PM / runtime: Check ignore_children in pm_runtime_need_not_resume()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael J. Wysocki committed Jan 15, 2018
1 parent 4918e1f commit 1f5c685
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/base/power/runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 1f5c685

Please sign in to comment.