aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/power/suspend.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c
index 5178b0fbd82e..a3ff3944832a 100644
--- a/drivers/base/power/suspend.c
+++ b/drivers/base/power/suspend.c
@@ -71,21 +71,19 @@ int suspend_device(struct device * dev, pm_message_t state)
71 dev->parent->power.power_state.event); 71 dev->parent->power.power_state.event);
72 } 72 }
73 73
74 if (dev->class && dev->class->suspend && !dev->power.power_state.event) { 74 if (dev->class && dev->class->suspend) {
75 suspend_device_dbg(dev, state, "class "); 75 suspend_device_dbg(dev, state, "class ");
76 error = dev->class->suspend(dev, state); 76 error = dev->class->suspend(dev, state);
77 suspend_report_result(dev->class->suspend, error); 77 suspend_report_result(dev->class->suspend, error);
78 } 78 }
79 79
80 if (!error && dev->type && dev->type->suspend 80 if (!error && dev->type && dev->type->suspend) {
81 && !dev->power.power_state.event) {
82 suspend_device_dbg(dev, state, "type "); 81 suspend_device_dbg(dev, state, "type ");
83 error = dev->type->suspend(dev, state); 82 error = dev->type->suspend(dev, state);
84 suspend_report_result(dev->type->suspend, error); 83 suspend_report_result(dev->type->suspend, error);
85 } 84 }
86 85
87 if (!error && dev->bus && dev->bus->suspend 86 if (!error && dev->bus && dev->bus->suspend) {
88 && !dev->power.power_state.event) {
89 suspend_device_dbg(dev, state, ""); 87 suspend_device_dbg(dev, state, "");
90 error = dev->bus->suspend(dev, state); 88 error = dev->bus->suspend(dev, state);
91 suspend_report_result(dev->bus->suspend, error); 89 suspend_report_result(dev->bus->suspend, error);
@@ -104,8 +102,7 @@ static int suspend_device_late(struct device *dev, pm_message_t state)
104{ 102{
105 int error = 0; 103 int error = 0;
106 104
107 if (dev->bus && dev->bus->suspend_late 105 if (dev->bus && dev->bus->suspend_late) {
108 && !dev->power.power_state.event) {
109 suspend_device_dbg(dev, state, "LATE "); 106 suspend_device_dbg(dev, state, "LATE ");
110 error = dev->bus->suspend_late(dev, state); 107 error = dev->bus->suspend_late(dev, state);
111 suspend_report_result(dev->bus->suspend_late, error); 108 suspend_report_result(dev->bus->suspend_late, error);