power: Wake unlock in case of cancelling transition 53/288553/1 accepted/tizen/7.0/unified/20230227.140639
authorYoungjae Cho <y0.cho@samsung.com>
Thu, 16 Feb 2023 06:36:14 +0000 (15:36 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Mon, 20 Feb 2023 02:58:08 +0000 (11:58 +0900)
Properly unlock the secondary wakelock when cancelling transition.
Currently there is no scenario for cancelling wakeup transition though,
it is important when it comes to undoing wakeup and trying to go sleep
again.

Change-Id: I5c4cc65d6bf8453919e0a2624603b8c04f574eb7
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/power/power.c

index 1ed50fc..866386b 100644 (file)
@@ -669,6 +669,7 @@ static void action_transition(void)
        if (post_action_state[index])
                post_action_state[index](transition_context.ti.data);
 
+trigger_next:
        /**
         * transition_context.ongiong must be reset after the post_action_state().
         * This prevents the post_action_state() from triggering another transition
@@ -678,7 +679,6 @@ static void action_transition(void)
        transition_context.ongoing = 0;
        event_wake_unlock(EL_POWER_TRANSITION_STATE);
 
-trigger_next:
        retval = dequeue_transition(&ti);
        if (retval == 0) {
                prepare_transition(&ti);