summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2025-12-02 11:30:25 -0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-12-04 20:38:13 +0100
commit41f7351fc47283822c4b70b0f42741f52cc1e6f6 (patch)
treed3b7bc58f69e38f7afb97d8624a541b378549216 /drivers/base
parent3df2470adc1ce91f19021109c83c6e497d362835 (diff)
PM: runtime: Make pm_runtime_barrier() return void
No callers check the return code, and that's a good thing. Doing so would be racy and unhelpful. Drop the return code entirely, so we don't make anyone think about its complexities. Signed-off-by: Brian Norris <briannorris@chromium.org> Tested-by: Guenter Roeck <linux@roeck-us.net> Link: https://patch.msgid.link/20251202193129.1411419-2-briannorris@chromium.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/runtime.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index 62707738caa4..84676cc24221 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -1467,30 +1467,20 @@ static void __pm_runtime_barrier(struct device *dev)
* Next, make sure that all pending requests for the device have been flushed
* from pm_wq and wait for all runtime PM operations involving the device in
* progress to complete.
- *
- * Return value:
- * 1, if there was a resume request pending and the device had to be woken up,
- * 0, otherwise
*/
-int pm_runtime_barrier(struct device *dev)
+void pm_runtime_barrier(struct device *dev)
{
- int retval = 0;
-
pm_runtime_get_noresume(dev);
spin_lock_irq(&dev->power.lock);
if (dev->power.request_pending
- && dev->power.request == RPM_REQ_RESUME) {
+ && dev->power.request == RPM_REQ_RESUME)
rpm_resume(dev, 0);
- retval = 1;
- }
__pm_runtime_barrier(dev);
spin_unlock_irq(&dev->power.lock);
pm_runtime_put_noidle(dev);
-
- return retval;
}
EXPORT_SYMBOL_GPL(pm_runtime_barrier);