[rtems commit] drvmgr: Move bsp_driver_level_hook() calls
Sebastian Huber
sebh at rtems.org
Tue Jan 26 10:55:28 UTC 2016
Module: rtems
Branch: master
Commit: 61bbf9194ff4bdbc1b48e6ac9919c02b358e5701
Changeset: http://git.rtems.org/rtems/commit/?id=61bbf9194ff4bdbc1b48e6ac9919c02b358e5701
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Jan 26 07:17:27 2016 +0100
drvmgr: Move bsp_driver_level_hook() calls
---
cpukit/libdrvmgr/drvmgr.c | 13 +++++++------
cpukit/sapi/src/exinit.c | 4 ----
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/cpukit/libdrvmgr/drvmgr.c b/cpukit/libdrvmgr/drvmgr.c
index 7c37afd..66d6cfa 100644
--- a/cpukit/libdrvmgr/drvmgr.c
+++ b/cpukit/libdrvmgr/drvmgr.c
@@ -68,14 +68,15 @@ void _DRV_Manager_init_level(int level)
{
struct drvmgr *mgr = &drvmgr;
- if (mgr->level >= level)
- return;
+ if (mgr->level < level) {
+ /* Set new Level */
+ mgr->level = level;
- /* Set new Level */
- mgr->level = level;
+ /* Initialize buses and devices into this new level */
+ drvmgr_init_update();
+ }
- /* Initialize buses and devices into this new level */
- drvmgr_init_update();
+ bsp_driver_level_hook(level);
}
/* Initialize Data structures of the driver manager and call driver
diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c
index 1eaf24f..13154ce 100644
--- a/cpukit/sapi/src/exinit.c
+++ b/cpukit/sapi/src/exinit.c
@@ -190,7 +190,6 @@ static void rtems_initialize_device_drivers(void)
* - Install extra memory.
*/
_DRV_Manager_init_level(1);
- bsp_driver_level_hook(1);
#endif
/* Initialize I/O drivers.
@@ -211,7 +210,6 @@ static void rtems_initialize_device_drivers(void)
* for the first time.
*/
_DRV_Manager_init_level(2);
- bsp_driver_level_hook(2);
/* Init Drivers to Level 3
*
@@ -220,13 +218,11 @@ static void rtems_initialize_device_drivers(void)
* API inited in level 2
*/
_DRV_Manager_init_level(3);
- bsp_driver_level_hook(3);
/* Init Drivers to Level 4,
* Init drivers that depend on services initialized in Level 3
*/
_DRV_Manager_init_level(4);
- bsp_driver_level_hook(4);
#endif
#if defined(RTEMS_MULTIPROCESSING)
More information about the vc
mailing list