summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-04-05 12:21:09 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-04-05 12:21:09 +0900
commit94a46d3cde81fc82eef2105fcb5c9e6e31bac0f7 (patch)
tree445ff43779938b539e0799e81c90b85bbee552cd /drivers/base
parent720fcb36ac1aa2df2c54c170253b6b29600cbefc (diff)
parentdb217dece3003df0841bacf9556b5c06aa097dae (diff)
downloadlinux-3.10-94a46d3cde81fc82eef2105fcb5c9e6e31bac0f7.tar.gz
linux-3.10-94a46d3cde81fc82eef2105fcb5c9e6e31bac0f7.tar.bz2
linux-3.10-94a46d3cde81fc82eef2105fcb5c9e6e31bac0f7.zip
Merge branch 'sh/stable-updates'
Diffstat (limited to 'drivers/base')
-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 d477f4dc5e5..941fcb87e52 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;
}