Skip to content

Commit 568e894

Browse files
liuqian.andyliuqian.andy
authored andcommitted
init: remove duplicate code
API z_device_state_init has already defined in device.c Signed-off-by: liuqian.andy <liuqian.andyl@picoheart.com>
1 parent 0f9932a commit 568e894

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

kernel/init.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -192,19 +192,7 @@ bool z_sys_post_kernel;
192192

193193
/* defined in device.c */
194194
extern int do_device_init(const struct device *dev);
195-
196-
/**
197-
* @brief Initialize state for all static devices.
198-
*
199-
* The state object is always zero-initialized, but this may not be
200-
* sufficient.
201-
*/
202-
static void z_device_state_init(void)
203-
{
204-
STRUCT_SECTION_FOREACH(device, dev) {
205-
k_object_init(dev);
206-
}
207-
}
195+
extern void z_device_state_init(void);
208196

209197
/**
210198
* @brief Execute all the init entry initialization functions at a given level

0 commit comments

Comments
 (0)