aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/pci-driver.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-03-23 01:38:34 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2006-04-14 11:41:25 -0700
commit026694920579590c73b5c56705d543568ed5ad41 (patch)
tree1c3ad318fe65c5812dd33008af8e77389ee31c46 /drivers/pci/pci-driver.c
parent372254018eb1b65ee69210d11686bfc65c8d84db (diff)
[PATCH] pm: print name of failed suspend function
Print more diagnostic info to help identify the source of power management suspend failures. Example: usb_hcd_pci_suspend(): pci_set_power_state+0x0/0x1af() returns -22 pci_device_suspend(): usb_hcd_pci_suspend+0x0/0x11b() returns -22 suspend_device(): pci_device_suspend+0x0/0x34() returns -22 Work-in-progress. It needs lots more suspend_report_result() calls sprinkled everywhere. Cc: Patrick Mochel <mochel@digitalimplant.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: Nigel Cunningham <nigel@suspend2.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r--drivers/pci/pci-driver.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index f22f69ac644..1456759936c 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -271,10 +271,12 @@ static int pci_device_suspend(struct device * dev, pm_message_t state)
struct pci_driver * drv = pci_dev->driver;
int i = 0;
- if (drv && drv->suspend)
+ if (drv && drv->suspend) {
i = drv->suspend(pci_dev, state);
- else
+ suspend_report_result(drv->suspend, i);
+ } else {
pci_save_state(pci_dev);
+ }
return i;
}