lkml.org 
[lkml]   [2017]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] PCI / PM: Add dev_dbg() to print device suspend power states
Date
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

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>
---
drivers/pci/pci-driver.c | 3 +++
1 file changed, 3 insertions(+)

Index: linux-pm/drivers/pci/pci-driver.c
===================================================================
--- linux-pm.orig/drivers/pci/pci-driver.c
+++ linux-pm/drivers/pci/pci-driver.c
@@ -798,6 +798,9 @@ static int pci_pm_suspend_noirq(struct d
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);

/*
\
 
 \ /
  Last update: 2017-09-30 01:41    [W:0.031 / U:15.460 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site