diff options
Diffstat (limited to 'drivers/base/power/suspend.c')
-rw-r--r-- | drivers/base/power/suspend.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c index a0b5cf689e63..0ec44ef840be 100644 --- a/drivers/base/power/suspend.c +++ b/drivers/base/power/suspend.c | |||
@@ -39,12 +39,25 @@ int suspend_device(struct device * dev, pm_message_t state) | |||
39 | { | 39 | { |
40 | int error = 0; | 40 | int error = 0; |
41 | 41 | ||
42 | dev_dbg(dev, "suspending\n"); | 42 | if (dev->power.power_state) { |
43 | dev_dbg(dev, "PM: suspend %d-->%d\n", | ||
44 | dev->power.power_state, state); | ||
45 | } | ||
46 | if (dev->power.pm_parent | ||
47 | && dev->power.pm_parent->power.power_state) { | ||
48 | dev_err(dev, | ||
49 | "PM: suspend %d->%d, parent %s already %d\n", | ||
50 | dev->power.power_state, state, | ||
51 | dev->power.pm_parent->bus_id, | ||
52 | dev->power.pm_parent->power.power_state); | ||
53 | } | ||
43 | 54 | ||
44 | dev->power.prev_state = dev->power.power_state; | 55 | dev->power.prev_state = dev->power.power_state; |
45 | 56 | ||
46 | if (dev->bus && dev->bus->suspend && !dev->power.power_state) | 57 | if (dev->bus && dev->bus->suspend && !dev->power.power_state) { |
58 | dev_dbg(dev, "suspending\n"); | ||
47 | error = dev->bus->suspend(dev, state); | 59 | error = dev->bus->suspend(dev, state); |
60 | } | ||
48 | 61 | ||
49 | return error; | 62 | return error; |
50 | } | 63 | } |