Skip to content

Commit 9f5b527

Browse files
storulfrafaeljw
authored andcommitted
PM / Runtime: Avoid resuming devices again in pm_runtime_force_resume()
If the runtime PM status of the device isn't RPM_SUSPENDED, prevent the pm_runtime_force_resume() from invoking the ->runtime_resume() callback for the device, as it's not the expected behaviour from the subsystem/driver. Signed-off-by: Ulf Hansson <[email protected]> Reviewed-by: Kevin Hilman <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 9b002b8 commit 9f5b527

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/base/power/runtime.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,6 +1506,9 @@ int pm_runtime_force_resume(struct device *dev)
15061506
goto out;
15071507
}
15081508

1509+
if (!pm_runtime_status_suspended(dev))
1510+
goto out;
1511+
15091512
ret = pm_runtime_set_active(dev);
15101513
if (ret)
15111514
goto out;

0 commit comments

Comments
 (0)