aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-03-23 04:38:34 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-04-14 14:41:25 -0400
commit026694920579590c73b5c56705d543568ed5ad41 (patch)
tree1c3ad318fe65c5812dd33008af8e77389ee31c46 /include/linux/pm.h
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 'include/linux/pm.h')
-rw-r--r--include/linux/pm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 6df2585c0169..66be58902b17 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -199,6 +199,12 @@ extern int device_suspend(pm_message_t state);
199 199
200extern int dpm_runtime_suspend(struct device *, pm_message_t); 200extern int dpm_runtime_suspend(struct device *, pm_message_t);
201extern void dpm_runtime_resume(struct device *); 201extern void dpm_runtime_resume(struct device *);
202extern void __suspend_report_result(const char *function, void *fn, int ret);
203
204#define suspend_report_result(fn, ret) \
205 do { \
206 __suspend_report_result(__FUNCTION__, fn, ret); \
207 } while (0)
202 208
203#else /* !CONFIG_PM */ 209#else /* !CONFIG_PM */
204 210
@@ -219,6 +225,8 @@ static inline void dpm_runtime_resume(struct device * dev)
219{ 225{
220} 226}
221 227
228#define suspend_report_result(fn, ret) do { } while (0)
229
222#endif 230#endif
223 231
224/* changes to device_may_wakeup take effect on the next pm state change. 232/* changes to device_may_wakeup take effect on the next pm state change.