summaryrefslogtreecommitdiff
path: root/drivers/base/power/main.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-02-11 15:17:12 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-02-14 01:19:25 +0300
commit4a0fa9f9fdb5a7230da6fb250c270c01d5f21fb5 (patch)
treebc6aa594d954ce0779dd5bfbbf729339b503f684 /drivers/base/power/main.c
parentfed7e88c0702e30fcd55563ca6eecd548a5d13af (diff)
downloadlinux-4a0fa9f9fdb5a7230da6fb250c270c01d5f21fb5.tar.xz
PM / suspend: Print debug messages for device using direct-complete
Devices using the direct-complete optimization are not present it debug messages printed by the core device suspend and resume code, which sometimes makes it difficult to diagnose problems related to them, so add debug messages for those devices. 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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 0992e67e862b..337a56ff11b7 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -1741,8 +1741,10 @@ 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_status_suspended(dev))
+ if (pm_runtime_status_suspended(dev)) {
+ pm_dev_dbg(dev, state, "direct-complete ");
goto Complete;
+ }
pm_runtime_enable(dev);
}