Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f5c6855 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

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: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 4918e1f8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);
}

/**