[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPDyKFrV2VXJbT1ye8dc10VBp=nzu5vF_j_zbj_Q_=5pA+e34A@mail.gmail.com>
Date: Mon, 15 Jan 2018 16:05:55 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Linux PM <linux-pm@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: Re: [PATCH] PM / runtime: Check ignore_children in pm_runtime_need_not_resume()
On 15 January 2018 at 01:46, Rafael J. Wysocki <rjw@...ysocki.net> wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.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@...aro.org>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Reviewed-by: Ulf Hansson <ulf.hansson@...aro.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);
> }
>
> /**
>
Powered by blists - more mailing lists