PM / suspend: Print debug messages for device using direct-complete
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 11 Feb 2019 12:17:12 +0000 (13:17 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 13 Feb 2019 22:19:25 +0000 (23:19 +0100)
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>
drivers/base/power/main.c

index 0992e67e862b7d7e8a154ae9319f48be171fe2e7..337a56ff11b7fb31298d578b5af882c6cd6e272d 100644 (file)
@@ -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);
                }