mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[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 <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Nigel Cunningham <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
372254018e
commit
0266949205
5 changed files with 31 additions and 8 deletions
|
|
@ -199,6 +199,12 @@ extern int device_suspend(pm_message_t state);
|
|||
|
||||
extern int dpm_runtime_suspend(struct device *, pm_message_t);
|
||||
extern void dpm_runtime_resume(struct device *);
|
||||
extern void __suspend_report_result(const char *function, void *fn, int ret);
|
||||
|
||||
#define suspend_report_result(fn, ret) \
|
||||
do { \
|
||||
__suspend_report_result(__FUNCTION__, fn, ret); \
|
||||
} while (0)
|
||||
|
||||
#else /* !CONFIG_PM */
|
||||
|
||||
|
|
@ -219,6 +225,8 @@ static inline void dpm_runtime_resume(struct device * dev)
|
|||
{
|
||||
}
|
||||
|
||||
#define suspend_report_result(fn, ret) do { } while (0)
|
||||
|
||||
#endif
|
||||
|
||||
/* changes to device_may_wakeup take effect on the next pm state change.
|
||||
|
|
|
|||
Loading…
Reference in a new issue