summaryrefslogtreecommitdiffstats
path: root/drivers/base/power/main.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2010-05-03 15:25:35 +0200
committerJiri Kosina <jkosina@suse.cz>2010-05-03 15:25:35 +0200
commitd6d53cbc6b10d28646fb6184d1069f336ec76dc4 (patch)
tree1c844b3ce8bd430becbbb74875898b08d9f89bb5 /drivers/base/power/main.c
parent0b5adf92ec793c665b0de63ac146d190a921c391 (diff)
parent6a740aa4f47b9f29bad5292cf51f008f3edad9b1 (diff)
downloadblackbird-op-linux-d6d53cbc6b10d28646fb6184d1069f336ec76dc4.tar.gz
blackbird-op-linux-d6d53cbc6b10d28646fb6184d1069f336ec76dc4.zip
Merge branch 'hid-suspend' into picolcd
Diffstat (limited to 'drivers/base/power/main.c')
-rw-r--r--drivers/base/power/main.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index d477f4dc5e51..941fcb87e52a 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -439,8 +439,23 @@ static int device_resume_noirq(struct device *dev, pm_message_t state)
if (dev->bus && dev->bus->pm) {
pm_dev_dbg(dev, state, "EARLY ");
error = pm_noirq_op(dev, dev->bus->pm, state);
+ if (error)
+ goto End;
}
+ if (dev->type && dev->type->pm) {
+ pm_dev_dbg(dev, state, "EARLY type ");
+ error = pm_noirq_op(dev, dev->type->pm, state);
+ if (error)
+ goto End;
+ }
+
+ if (dev->class && dev->class->pm) {
+ pm_dev_dbg(dev, state, "EARLY class ");
+ error = pm_noirq_op(dev, dev->class->pm, state);
+ }
+
+End:
TRACE_RESUME(error);
return error;
}
@@ -735,10 +750,26 @@ static int device_suspend_noirq(struct device *dev, pm_message_t state)
{
int error = 0;
+ if (dev->class && dev->class->pm) {
+ pm_dev_dbg(dev, state, "LATE class ");
+ error = pm_noirq_op(dev, dev->class->pm, state);
+ if (error)
+ goto End;
+ }
+
+ if (dev->type && dev->type->pm) {
+ pm_dev_dbg(dev, state, "LATE type ");
+ error = pm_noirq_op(dev, dev->type->pm, state);
+ if (error)
+ goto End;
+ }
+
if (dev->bus && dev->bus->pm) {
pm_dev_dbg(dev, state, "LATE ");
error = pm_noirq_op(dev, dev->bus->pm, state);
}
+
+End:
return error;
}
OpenPOWER on IntegriCloud