aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power/suspend.c
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2005-06-02 13:12:57 -0400
committerDave Kleikamp <shaggy@austin.ibm.com>2005-06-02 13:12:57 -0400
commit7078253c085c037c070ca4e8bc9e9e7f18aa1e84 (patch)
treeeaf56c1a77b0de6ee82e23cee4433b2c4a47e67e /drivers/base/power/suspend.c
parent259692bd5a2b2c2d351dd90748ba4126bc2a21b9 (diff)
parent1e86d1c648508fd50e6c9960576b87906a7906ad (diff)
Merge with /home/shaggy/git/linus-clean/
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Diffstat (limited to 'drivers/base/power/suspend.c')
-rw-r--r--drivers/base/power/suspend.c17
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}