summaryrefslogtreecommitdiffstats
path: root/drivers/base/power/main.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2015-07-15 14:40:06 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-07-21 23:14:22 +0200
commit019d8817b1b064c2bacfbcf40fc68184438ad05a (patch)
treef6ac6a9eba69331a3341fa8c85f49d99a912bc41 /drivers/base/power/main.c
parentPM / autosleep: Use workqueue for user space wakeup sources garbage collector (diff)
downloadlinux-019d8817b1b064c2bacfbcf40fc68184438ad05a.tar.xz
linux-019d8817b1b064c2bacfbcf40fc68184438ad05a.zip
PM / sleep: Allow devices without runtime PM to do direct-complete
Don't unset the direct_complete flag on devices that have runtime PM disabled, if they are runtime suspended. This is needed because otherwise ancestor devices wouldn't be able to do direct_complete without adding runtime PM support to all its descendants. Also removes pm_runtime_suspended_if_enabled() because it's now unused. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/power/main.c')
-rw-r--r--drivers/base/power/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 30b7bbfdc558..1710c26ba097 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -1377,7 +1377,7 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
if (dev->power.direct_complete) {
if (pm_runtime_status_suspended(dev)) {
pm_runtime_disable(dev);
- if (pm_runtime_suspended_if_enabled(dev))
+ if (pm_runtime_status_suspended(dev))
goto Complete;
pm_runtime_enable(dev);