diff options
Diffstat (limited to 'drivers/base/power/resume.c')
-rw-r--r-- | drivers/base/power/resume.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/base/power/resume.c b/drivers/base/power/resume.c index f8f5055754d6..bdd96b03b885 100644 --- a/drivers/base/power/resume.c +++ b/drivers/base/power/resume.c @@ -22,9 +22,22 @@ extern int sysdev_resume(void); int resume_device(struct device * dev) { - if (dev->bus && dev->bus->resume) - return dev->bus->resume(dev); - return 0; + int error = 0; + + down(&dev->sem); + if (dev->power.pm_parent + && dev->power.pm_parent->power.power_state) { + dev_err(dev, "PM: resume from %d, parent %s still %d\n", + dev->power.power_state, + dev->power.pm_parent->bus_id, + dev->power.pm_parent->power.power_state); + } + if (dev->bus && dev->bus->resume) { + dev_dbg(dev,"resuming\n"); + error = dev->bus->resume(dev); + } + up(&dev->sem); + return error; } |