summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorBenoit Goby <benoit@android.com>2010-12-13 15:27:06 -0800
committerColin Cross <ccross@android.com>2011-06-14 09:09:39 -0700
commita0f07aae54e87a9fad6d19c0e57398f54d858f06 (patch)
treea498ad9c9bf85b9c409a8da11dcaf97aced6066e /drivers/base
parent1c4f95f81916c95b991019107782a2fa002b30bb (diff)
PM: Wait for completion of the parent resume before resuming
If the parent device is in the DPM_RESUMING state, resume might get called before the parent's resume has completed, because dpm_wait won't get called. This issue was introduced by: 3d46a3c PM: Prevent waiting forever on asynchronous resume after abort Wait for completion of the parent resume if the parent state is >= DPM_OFF or == DPM_RESUMING Signed-off-by: Benoit Goby <benoit@android.com> [dima: fixed to work on 2.6.38, use .in_suspend instead of .state] Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 111a77dba09..abd3e56b2fa 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -512,7 +512,7 @@ static int device_resume(struct device *dev, pm_message_t state, bool async)
TRACE_DEVICE(dev);
TRACE_RESUME(0);
- if (dev->parent && dev->parent->power.status >= DPM_OFF)
+ if (dev->parent && dev->parent->power.in_suspend)
dpm_wait(dev->parent, async);
device_lock(dev);