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)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:06:30 +0000 (12:06 -0800)
commitebe0533c50818b0f1d5683f87be2ecdc65bae40e
tree08558db14617692a47ea2abae1fcea70fefaa089
parentb76331ab97ca746c854546617393de8d15539151
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