allow to call nffs_pkg_init() multiple times
This commit is contained in:
1 parent
42a4c9f821
commit
5f2f9cd52b
1 file changed
+5
@@ -755,10 +755,15 @@ nffs_init(void)
|
||||
void
|
||||
nffs_pkg_init(void)
|
||||
{
|
||||
static bool already_init = false;
|
||||
|
||||
struct nffs_area_desc descs[NFFS_AREA_MAX + 1];
|
||||
int cnt;
|
||||
int rc;
|
||||
|
||||
if (already_init) return;
|
||||
already_init = true;
|
||||
|
||||
/* Ensure this function only gets called by sysinit. */
|
||||
SYSINIT_ASSERT_ACTIVE();
|
||||
|
||||
|
||||
Reference in new issue
Block a user