diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2016-05-30 05:33:12 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-06-16 09:14:36 -0400 |
commit | 9f5b52747dbf83816dcd29ea1700813aeb668c0f (patch) | |
tree | 4800bf074558395e79d82769dbaaeb13146d10b0 /drivers/base | |
parent | 9b002b8f0e386966dfc2dddf47eebed3b71ef876 (diff) |
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 <ulf.hansson@linaro.org>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/runtime.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) | |||
1506 | goto out; | 1506 | goto out; |
1507 | } | 1507 | } |
1508 | 1508 | ||
1509 | if (!pm_runtime_status_suspended(dev)) | ||
1510 | goto out; | ||
1511 | |||
1509 | ret = pm_runtime_set_active(dev); | 1512 | ret = pm_runtime_set_active(dev); |
1510 | if (ret) | 1513 | if (ret) |
1511 | goto out; | 1514 | goto out; |