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>
1 file changed