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: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2023-04-26 17:08:43 +02:00 committed by Fabio Baltieri
commit 259ec41c36

View file

@ -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)
{