subsys/fs/littlefs: initialize LittleFS at POST_KERNEL

Initialize LittleFS at POST_KERNEL and not at APPLICATION stage.

When using LittleFS as settings backend for OpenThread, LittleFS needs
to be available when net_init is performed.

Arguably, FS is an OS kernel component that should be ready when
applications are starting.

Possibly, the same change should be applied to FAT fs as well.

Signed-off-by: Markus Becker <markus.becker@tridonic.com>
This commit is contained in:
Markus Becker 2020-06-03 08:55:01 +02:00 committed by Ioannis Glaropoulos
parent 7f66fd84e8
commit 2291de6abf

View file

@ -734,4 +734,4 @@ static int littlefs_init(struct device *dev)
return fs_register(FS_LITTLEFS, &littlefs_fs);
}
SYS_INIT(littlefs_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
SYS_INIT(littlefs_init, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);