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>
This commit is contained in:
Rafael J. Wysocki 2017-09-30 01:31:15 +02:00
parent 1cb31d3fd4
commit ca67ab5c5a
1 changed files with 3 additions and 0 deletions

View File

@ -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);
/*