PM: Wait for completion of the parent resume before resuming
authorBenoit Goby <benoit@android.com>
Mon, 13 Dec 2010 23:27:06 +0000 (15:27 -0800)
committerDan Willemsen <dwillemsen@nvidia.com>
Thu, 1 Dec 2011 05:38:25 +0000 (21:38 -0800)
commit0c6b69bd67e32a76fdb72fd177e36577374a7dfb
treeb2c10d7d64bb74420940a1c7dd78c0619451636c
parent977087e8d324ac7f19d3690b5ecdf65382ce2a72
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>
drivers/base/power/main.c