1
0
Эх сурвалжийг харах

[kernel][device] remove rt_device_init_all()

Meco Man 4 жил өмнө
parent
commit
846102efa1

+ 0 - 3
bsp/frdm-k64f/applications/startup.c

@@ -73,9 +73,6 @@ void rtthread_startup(void)
     /* init scheduler system */
     /* init scheduler system */
     rt_system_scheduler_init();
     rt_system_scheduler_init();
 
 
-    /* init all device */
-    rt_device_init_all();
-
     /* init application */
     /* init application */
     rt_application_init();
     rt_application_init();
 
 

+ 0 - 5
bsp/mb9bf500r/startup.c

@@ -61,11 +61,6 @@ void rtthread_startup(void)
 	/* init scheduler system */
 	/* init scheduler system */
 	rt_system_scheduler_init();
 	rt_system_scheduler_init();
 
 
-#ifdef RT_USING_DEVICE
-	/* init all device */
-	rt_device_init_all();
-#endif
-
 	/* init application */
 	/* init application */
 	rt_application_init();
 	rt_application_init();
 
 

+ 0 - 2
include/rtthread.h

@@ -437,8 +437,6 @@ rt_err_t rt_device_unregister(rt_device_t dev);
 rt_device_t rt_device_create(int type, int attach_size);
 rt_device_t rt_device_create(int type, int attach_size);
 void rt_device_destroy(rt_device_t device);
 void rt_device_destroy(rt_device_t device);
 
 
-rt_err_t rt_device_init_all(void);
-
 rt_err_t
 rt_err_t
 rt_device_set_rx_indicate(rt_device_t dev,
 rt_device_set_rx_indicate(rt_device_t dev,
                           rt_err_t (*rx_ind)(rt_device_t dev, rt_size_t size));
                           rt_err_t (*rx_ind)(rt_device_t dev, rt_size_t size));

+ 1 - 13
src/device.c

@@ -12,6 +12,7 @@
  * 2012-12-25     Bernard      return RT_EOK if the device interface not exist.
  * 2012-12-25     Bernard      return RT_EOK if the device interface not exist.
  * 2013-07-09     Grissiom     add ref_count support
  * 2013-07-09     Grissiom     add ref_count support
  * 2016-04-02     Bernard      fix the open_flag initialization issue.
  * 2016-04-02     Bernard      fix the open_flag initialization issue.
+ * 2021-03-19     Meco Man     remove rt_device_init_all()
  */
  */
 
 
 #include <rtthread.h>
 #include <rtthread.h>
@@ -89,19 +90,6 @@ rt_err_t rt_device_unregister(rt_device_t dev)
 }
 }
 RTM_EXPORT(rt_device_unregister);
 RTM_EXPORT(rt_device_unregister);
 
 
-/**
- * This function initializes all registered device driver
- *
- * @return the error code, RT_EOK on successfully.
- *
- * @deprecated since 1.2.x, this function is not needed because the initialization
- *             of a device is performed when application opens it.
- */
-rt_err_t rt_device_init_all(void)
-{
-    return RT_EOK;
-}
-
 /**
 /**
  * This function finds a device driver by specified name.
  * This function finds a device driver by specified name.
  *
  *