Skip to content

Commit c34df14

Browse files
Flavio Ceolincfriedt
authored andcommitted
pm: Fix device resume order
This fix was previously done in 82a6104 but the commit 81f1225 re-introduced the problem. Signed-off-by: Flavio Ceolin <[email protected]>
1 parent c3e5899 commit c34df14

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

subsys/pm/power.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,7 @@ static int pm_suspend_devices(void)
151151

152152
static void pm_resume_devices(void)
153153
{
154-
size_t i;
155-
156-
for (i = 0; i < num_susp; i++) {
154+
for (int i = (num_susp - 1); i >= 0; i--) {
157155
pm_device_state_set(__pm_device_slots_start[i],
158156
PM_DEVICE_STATE_ACTIVE);
159157
}

0 commit comments

Comments
 (0)