* [PATCH] PM / runtime: Check ignore_children in pm_runtime_need_not_resume()
@ 2018-01-15 0:46 Rafael J. Wysocki
2018-01-15 15:05 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2018-01-15 0:46 UTC (permalink / raw)
To: Linux PM; +Cc: LKML, Ulf Hansson, Geert Uytterhoeven
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
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>
---
drivers/base/power/runtime.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux-pm/drivers/base/power/runtime.c
===================================================================
--- linux-pm.orig/drivers/base/power/runtime.c
+++ linux-pm/drivers/base/power/runtime.c
@@ -1616,7 +1616,8 @@ void pm_runtime_drop_link(struct device
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);
}
/**
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] PM / runtime: Check ignore_children in pm_runtime_need_not_resume()
2018-01-15 0:46 [PATCH] PM / runtime: Check ignore_children in pm_runtime_need_not_resume() Rafael J. Wysocki
@ 2018-01-15 15:05 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2018-01-15 15:05 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Linux PM, LKML, Geert Uytterhoeven
On 15 January 2018 at 01:46, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> 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>
Kind regards
Uffe
> ---
> drivers/base/power/runtime.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Index: linux-pm/drivers/base/power/runtime.c
> ===================================================================
> --- linux-pm.orig/drivers/base/power/runtime.c
> +++ linux-pm/drivers/base/power/runtime.c
> @@ -1616,7 +1616,8 @@ void pm_runtime_drop_link(struct device
> 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);
> }
>
> /**
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-15 15:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-15 0:46 [PATCH] PM / runtime: Check ignore_children in pm_runtime_need_not_resume() Rafael J. Wysocki
2018-01-15 15:05 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).