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

@ -48,14 +48,8 @@ static const struct spi_driver_api vnd_spi_api = {
.release = vnd_spi_release,
};
static int vnd_spi_init(const struct device *dev)
{
return 0;
}
#define VND_SPI_INIT(n) \
DEVICE_DT_INST_DEFINE(n, &vnd_spi_init, NULL, \
NULL, NULL, POST_KERNEL, \
#define VND_SPI_INIT(n) \
DEVICE_DT_INST_DEFINE(n, NULL, NULL, NULL, NULL, POST_KERNEL, \
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
&vnd_spi_api);