summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-09-30 01:31:15 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-10-03 02:40:38 +0200
commitca67ab5c5afbcec9df199e01838270eb5668af68 (patch)
treefa051ae5338c279ed414d7a4a12c9c2e4f53228e
parent1cb31d3fd4d96b19624328da0a0496adf76f98a6 (diff)
downloadlinux-ca67ab5c5afbcec9df199e01838270eb5668af68.tar.gz
PCI / PM: Add dev_dbg() to print device suspend power states
It sometimes is useful to know what power states the kernel thinks it puts PCI devices into during system suspend, so add a dev_dbg() statement for that. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r--drivers/pci/pci-driver.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 3d04b59..9be56306 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -798,6 +798,9 @@ static int pci_pm_suspend_noirq(struct device *dev)
pci_prepare_to_sleep(pci_dev);
}
+ dev_dbg(dev, "PCI PM: Suspend power state: %s\n",
+ pci_power_name(pci_dev->current_state));
+
pci_pm_set_unknown_state(pci_dev);
/*