nshlib: Move BOARDIOC_FINALINIT into nsh_initscript

1.Avoid the code duplication
2.Call BOARDIOC_FINALINIT onnce and only once
3.Ensure BOARDIOC_FINALINIT get called in all case

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2020-04-17 02:24:04 +08:00
committed by patacongo
parent 6c4dc44e04
commit ac5632fc50
4 changed files with 6 additions and 18 deletions

View File

@@ -292,12 +292,6 @@ int nsh_consolemain(int argc, char *argv[])
netinit_bringup();
#endif
#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT)
/* Perform architecture-specific final-initialization (if configured) */
boardctl(BOARDIOC_FINALINIT, 0);
#endif
/* First map stderr and stdout to alternative devices */
ret = nsh_clone_console(pstate);