device: remove redundant init functions

Remove all init functions that do nothing, and provide a `NULL` to
*DEVICE*DEFINE* macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2023-04-18 12:25:15 +02:00 committed by Carles Cufí
commit 1eb683a514
87 changed files with 149 additions and 735 deletions

View file

@ -138,16 +138,9 @@ static const struct can_driver_api fake_can_driver_api = {
#endif /* CONFIG_CAN_FD_MODE */
};
static int fake_can_init(const struct device *dev)
{
ARG_UNUSED(dev);
return 0;
}
#define FAKE_CAN_INIT(inst) \
DEVICE_DT_INST_DEFINE(inst, &fake_can_init, NULL, NULL, NULL, \
POST_KERNEL, CONFIG_CAN_INIT_PRIORITY, \
DEVICE_DT_INST_DEFINE(inst, NULL, NULL, NULL, NULL, POST_KERNEL,\
CONFIG_CAN_INIT_PRIORITY, \
&fake_can_driver_api);
DT_INST_FOREACH_STATUS_OKAY(FAKE_CAN_INIT)