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
|
@ -156,17 +156,6 @@ static int pin_config(const struct device *dev,
|
|||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Initialization function of creg_gpio
|
||||
*
|
||||
* @param dev Device struct
|
||||
* @return 0 if successful, failed otherwise.
|
||||
*/
|
||||
static int creg_gpio_init(const struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct gpio_driver_api api_table = {
|
||||
.pin_configure = pin_config,
|
||||
.port_get_raw = port_get,
|
||||
|
@ -191,7 +180,6 @@ static struct creg_gpio_drv_data creg_gpio_drvdata = {
|
|||
.base_addr = DT_INST_REG_ADDR(0),
|
||||
};
|
||||
|
||||
DEVICE_DT_INST_DEFINE(0, creg_gpio_init, NULL,
|
||||
&creg_gpio_drvdata, &creg_gpio_cfg,
|
||||
DEVICE_DT_INST_DEFINE(0, NULL, NULL, &creg_gpio_drvdata, &creg_gpio_cfg,
|
||||
POST_KERNEL, CONFIG_GPIO_INIT_PRIORITY,
|
||||
&api_table);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue