[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6038511.MhkbZ0Pkbq@rjwysocki.net>
Date: Tue, 11 Feb 2025 22:07:52 +0100
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Linux PM <linux-pm@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Alan Stern <stern@...land.harvard.edu>, Ulf Hansson <ulf.hansson@...aro.org>,
Johan Hovold <johan@...nel.org>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Jon Hunter <jonathanh@...dia.com>
Subject:
[PATCH v1 04/10] PM: runtime: Drop status check from
pm_runtime_force_resume()
From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Since pm_runtime_force_resume() requires pm_runtime_force_suspend() to
be called before it on the same device, the runtime PM status of that
device is RPM_SUSPENDED when it is called unless the device's runtime
PM status is changed somewhere else in the meantime.
However, even if that happens, the power.needs_force_resume
check is still required to pass and that flag is only set by
pm_runtime_force_suspend() and it is cleared at the end of
pm_runtime_force_resume(), so it cannot be taken into account
twice in a row.
Accordingly, the pm_runtime_status_suspended(dev) check in
pm_runtime_force_resume() is redundant, so drop it.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---
drivers/base/power/runtime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -1963,7 +1963,7 @@
int (*callback)(struct device *);
int ret = 0;
- if (!pm_runtime_status_suspended(dev) || !dev->power.needs_force_resume)
+ if (!dev->power.needs_force_resume)
goto out;
/*
Powered by blists - more mailing lists