From: Ulf Hansson Date: Mon, 30 May 2016 09:33:12 +0000 (+0200) Subject: PM / Runtime: Avoid resuming devices again in pm_runtime_force_resume() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9f5b52747dbf83816dcd29ea1700813aeb668c0f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index b74690418504..09e4eb1a7286 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -1506,6 +1506,9 @@ int pm_runtime_force_resume(struct device *dev) goto out; } + if (!pm_runtime_status_suspended(dev)) + goto out; + ret = pm_runtime_set_active(dev); if (ret) goto out;