power: clarify notion of action callback function 52/287552/5
authorYoungjae Cho <y0.cho@samsung.com>
Tue, 31 Jan 2023 09:06:59 +0000 (18:06 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Tue, 7 Feb 2023 01:42:11 +0000 (10:42 +0900)
commit111b52e8fb75bbe3f363ae5d58dcda6fb22bb5da
tree6f0a0b7e4296690fbce76941e5bbce858f018341
parentc8efbe613002db27419227ed5e94a090439b2457
power: clarify notion of action callback function

The callback, action_for_state(), now denotes jobs that are necessary
before the target state, that is, it is kind of to-do list for entering
the state.

To this end, the name has been slightnly changed from action_on_state(),
which implies it is invoked right 'after' the state change, to
action_for_state(), which emphasizes it is invoked 'before' the state.

In addition, the position where the variable 'current' is updated has
been relocated to fit into the concept of action_for_state(). That is,
it is updated after the callback.

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