This is an automated email from the ASF dual-hosted git repository.

masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new a594a5d7a8 sched/init: drivers_initialize() should be late than 
up_initialize()
a594a5d7a8 is described below

commit a594a5d7a8dcd756884ca7d3449f37ba77f96af3
Author: chao.an <[email protected]>
AuthorDate: Mon Apr 11 19:44:26 2022 +0800

    sched/init: drivers_initialize() should be late than up_initialize()
    
    up_initialize
    |
     ->up_serialinit
       |
        ->uart_register  /* ("/dev/console", &CONSOLE_DEV); */
    
    drivers_initialize
    |
     ->syslog_console_init
       |
        ->register_driver /* ("/dev/console", &g_consoleops, 0666, NULL); */
    
    Signed-off-by: chao.an <[email protected]>
---
 sched/init/nx_start.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sched/init/nx_start.c b/sched/init/nx_start.c
index 939c8fb187..9f5b04f048 100644
--- a/sched/init/nx_start.c
+++ b/sched/init/nx_start.c
@@ -650,10 +650,6 @@ void nx_start(void)
   binfmt_initialize();
 #endif
 
-  /* Initialize common drivers */
-
-  drivers_initialize();
-
   /* Initialize Hardware Facilities *****************************************/
 
   /* The processor specific details of running the operating system
@@ -664,6 +660,10 @@ void nx_start(void)
 
   up_initialize();
 
+  /* Initialize common drivers */
+
+  drivers_initialize();
+
 #ifdef CONFIG_BOARD_EARLY_INITIALIZE
   /* Call the board-specific up_initialize() extension to support
    * early initialization of board-specific drivers and resources

Reply via email to