Commit 259ec41c authored by Gerard Marull-Paretas's avatar Gerard Marull-Paretas Committed by Fabio Baltieri
Browse files

samples: boards: nrf: system_off: use PRE_KERNEL_1



Sample was using PRE_KERNEL_2, but the action (lock OFF state) can be
run at any time before the Kernel starts, ie, PRE_KERNEL_1/2. Use
PRE_KERNEL_1 + 99 to preserve similar behavior.

Signed-off-by: default avatarGerard Marull-Paretas <gerard.marull@nordicsemi.no>
parent 70e921db
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -22,8 +22,7 @@
 * or `K_FOREVER` due to the default residency policy.
 *
 * This has to be done before anything tries to sleep, which means
 * before the threading system starts up between PRE_KERNEL_2 and
 * POST_KERNEL.  Do it at the start of PRE_KERNEL_2.
 * before the threading system starts up.
 */
static int disable_ds_1(void)
{
@@ -32,7 +31,7 @@ static int disable_ds_1(void)
	return 0;
}

SYS_INIT(disable_ds_1, PRE_KERNEL_2, 0);
SYS_INIT(disable_ds_1, PRE_KERNEL_1, 99);

int main(void)
{