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:
parent
1b73d1e0c6
commit
1eb683a514
87 changed files with 149 additions and 735 deletions
|
@ -72,13 +72,6 @@ static struct regulator_parent_driver_api parent_api = {
|
|||
.dvs_state_set = regulator_parent_fake_dvs_state_set,
|
||||
};
|
||||
|
||||
static int regulator_fake_common_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define FAKE_DATA_NAME(node_id) _CONCAT(data_, DT_DEP_ORD(node_id))
|
||||
#define FAKE_CONF_NAME(node_id) _CONCAT(config_, DT_DEP_ORD(node_id))
|
||||
|
||||
|
@ -95,8 +88,7 @@ static int regulator_fake_common_init(const struct device *dev)
|
|||
&api);
|
||||
|
||||
#define REGULATOR_FAKE_DEFINE_ALL(inst) \
|
||||
DEVICE_DT_INST_DEFINE(inst, regulator_fake_common_init, NULL, NULL, \
|
||||
NULL, POST_KERNEL, \
|
||||
DEVICE_DT_INST_DEFINE(inst, NULL, NULL, NULL, NULL, POST_KERNEL, \
|
||||
CONFIG_REGULATOR_FAKE_COMMON_INIT_PRIORITY, \
|
||||
&parent_api); \
|
||||
\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue