From a3d96ed555a411e927d14ce2d95be0203d041fb7 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Tue, 12 Dec 2017 07:38:02 +0800 Subject: Use rt_object_get_information to get object chain --- bsp/simulator/drivers/module_win32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bsp/simulator') diff --git a/bsp/simulator/drivers/module_win32.c b/bsp/simulator/drivers/module_win32.c index 0c998eed2c..8fcf3ef2fe 100644 --- a/bsp/simulator/drivers/module_win32.c +++ b/bsp/simulator/drivers/module_win32.c @@ -164,15 +164,15 @@ rt_module_t rt_module_find(const char *name) struct rt_object *object; struct rt_list_node *node; - extern struct rt_object_information rt_object_container[]; - RT_DEBUG_NOT_IN_INTERRUPT; /* enter critical */ rt_enter_critical(); /* try to find device object */ - information = &rt_object_container[RT_Object_Class_Module]; + information = rt_object_get_information(RT_Object_Class_Module); + RT_ASSERT(information != RT_NULL); + for (node = information->object_list.next; node != &(information->object_list); node = node->next) -- cgit v1.3.1