diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-04-05 12:21:09 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-04-05 12:21:09 +0900 |
commit | 94a46d3cde81fc82eef2105fcb5c9e6e31bac0f7 (patch) | |
tree | 445ff43779938b539e0799e81c90b85bbee552cd /drivers/base | |
parent | 720fcb36ac1aa2df2c54c170253b6b29600cbefc (diff) | |
parent | db217dece3003df0841bacf9556b5c06aa097dae (diff) |
Merge branch 'sh/stable-updates'
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/main.c | 31 |
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; } |