power: fix condition for available starting state
The condition for checking queue should have come first. This matters
during a system haven't been initialized, that is before the call of
delayed_init_callback(). Before the delayed_init_callback(), all
requests are enqueued even though transition is not underway. In this
case, it is possible to meet the both condtitions below:
1. there is no ongoing transition
2. there are some enqueued transitions
In this situation, we must select the last state of transition as an
available state. But the previous condition chooses the current state.
Change-Id: If6285e2ca78734378ac9b626947b24ebb3d8594d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
d861ffd68509eb9871c0ab0f990e8cde61da5940)