From 2fd265406edc642dc083ecc76b286611b4585c64 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Mon, 8 Mar 2021 17:22:21 +0800 Subject: [include] auto formatted --- include/rtthread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/rtthread.h') diff --git a/include/rtthread.h b/include/rtthread.h index 1e0094e73b..9bcf05820c 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * -- cgit v1.3.1 From 846102efa1ba3af5d8431db09adabe38af0e28a7 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Fri, 19 Mar 2021 03:01:07 +0800 Subject: [kernel][device] remove rt_device_init_all() --- bsp/frdm-k64f/applications/startup.c | 3 --- bsp/mb9bf500r/startup.c | 5 ----- include/rtthread.h | 2 -- src/device.c | 14 +------------- 4 files changed, 1 insertion(+), 23 deletions(-) (limited to 'include/rtthread.h') diff --git a/bsp/frdm-k64f/applications/startup.c b/bsp/frdm-k64f/applications/startup.c index d16aefddb2..e558cd8cbf 100644 --- a/bsp/frdm-k64f/applications/startup.c +++ b/bsp/frdm-k64f/applications/startup.c @@ -73,9 +73,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); - /* init all device */ - rt_device_init_all(); - /* init application */ rt_application_init(); diff --git a/bsp/mb9bf500r/startup.c b/bsp/mb9bf500r/startup.c index bc96eb5dca..a8718750fc 100644 --- a/bsp/mb9bf500r/startup.c +++ b/bsp/mb9bf500r/startup.c @@ -61,11 +61,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); -#ifdef RT_USING_DEVICE - /* init all device */ - rt_device_init_all(); -#endif - /* init application */ rt_application_init(); diff --git a/include/rtthread.h b/include/rtthread.h index 9bcf05820c..e80257a6e5 100644 --- a/include/rtthread.h +++ b/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); void rt_device_destroy(rt_device_t device); -rt_err_t rt_device_init_all(void); - rt_err_t rt_device_set_rx_indicate(rt_device_t dev, rt_err_t (*rx_ind)(rt_device_t dev, rt_size_t size)); diff --git a/src/device.c b/src/device.c index 388c2ecf12..50b83c7692 100644 --- a/src/device.c +++ b/src/device.c @@ -12,6 +12,7 @@ * 2012-12-25 Bernard return RT_EOK if the device interface not exist. * 2013-07-09 Grissiom add ref_count support * 2016-04-02 Bernard fix the open_flag initialization issue. + * 2021-03-19 Meco Man remove rt_device_init_all() */ #include @@ -89,19 +90,6 @@ rt_err_t rt_device_unregister(rt_device_t dev) } 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. * -- cgit v1.3.1