diff options
-rw-r--r-- | drivers/base/power/suspend.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c index 2a769cc6f5f9..1a1fe43a3057 100644 --- a/drivers/base/power/suspend.c +++ b/drivers/base/power/suspend.c | |||
@@ -29,6 +29,15 @@ | |||
29 | * lists. This way, the ancestors will be accessed before their descendents. | 29 | * lists. This way, the ancestors will be accessed before their descendents. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | static inline char *suspend_verb(u32 event) | ||
33 | { | ||
34 | switch (event) { | ||
35 | case PM_EVENT_SUSPEND: return "suspend"; | ||
36 | case PM_EVENT_FREEZE: return "freeze"; | ||
37 | default: return "(unknown suspend event)"; | ||
38 | } | ||
39 | } | ||
40 | |||
32 | 41 | ||
33 | /** | 42 | /** |
34 | * suspend_device - Save state of one device. | 43 | * suspend_device - Save state of one device. |
@@ -57,7 +66,13 @@ int suspend_device(struct device * dev, pm_message_t state) | |||
57 | dev->power.prev_state = dev->power.power_state; | 66 | dev->power.prev_state = dev->power.power_state; |
58 | 67 | ||
59 | if (dev->bus && dev->bus->suspend && !dev->power.power_state.event) { | 68 | if (dev->bus && dev->bus->suspend && !dev->power.power_state.event) { |
60 | dev_dbg(dev, "suspending\n"); | 69 | dev_dbg(dev, "%s%s\n", |
70 | suspend_verb(state.event), | ||
71 | ((state.event == PM_EVENT_SUSPEND) | ||
72 | && device_may_wakeup(dev)) | ||
73 | ? ", may wakeup" | ||
74 | : "" | ||
75 | ); | ||
61 | error = dev->bus->suspend(dev, state); | 76 | error = dev->bus->suspend(dev, state); |
62 | suspend_report_result(dev->bus->suspend, error); | 77 | suspend_report_result(dev->bus->suspend, error); |
63 | } | 78 | } |