drivers: Convert to use new DEVICE_DT_INST_* macros
Move users that are DEVICE_DT_DECLARE(DT_DRV_INST(n, ...)) to DEVICE_DT_INST_DECLARE(n, ...) and similar for DEVICE_DT_DEFINE. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
3a83f0ec69
commit
06a5946266
7 changed files with 11 additions and 11 deletions
|
@ -883,7 +883,7 @@ static const struct qspi_nor_config flash_id = {
|
|||
.size = INST_0_BYTES,
|
||||
};
|
||||
|
||||
DEVICE_DT_DEFINE(DT_DRV_INST(0), &qspi_nor_init, device_pm_control_nop,
|
||||
&qspi_nor_memory_data, &flash_id,
|
||||
POST_KERNEL, CONFIG_NORDIC_QSPI_NOR_INIT_PRIORITY,
|
||||
&qspi_nor_api);
|
||||
DEVICE_DT_INST_DEFINE(0, &qspi_nor_init, device_pm_control_nop,
|
||||
&qspi_nor_memory_data, &flash_id,
|
||||
POST_KERNEL, CONFIG_NORDIC_QSPI_NOR_INIT_PRIORITY,
|
||||
&qspi_nor_api);
|
||||
|
|
|
@ -281,7 +281,7 @@ static int nrf_flash_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEVICE_DT_DEFINE(DT_DRV_INST(0), nrf_flash_init, device_pm_control_nop,
|
||||
DEVICE_DT_INST_DEFINE(0, nrf_flash_init, device_pm_control_nop,
|
||||
NULL, NULL,
|
||||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
&flash_nrf_api);
|
||||
|
|
|
@ -1039,7 +1039,7 @@ static const struct spi_nor_config spi_nor_config_0 = {
|
|||
|
||||
static struct spi_nor_data spi_nor_data_0;
|
||||
|
||||
DEVICE_DT_DEFINE(DT_DRV_INST(0), &spi_nor_init, device_pm_control_nop,
|
||||
DEVICE_DT_INST_DEFINE(0, &spi_nor_init, device_pm_control_nop,
|
||||
&spi_nor_data_0, &spi_nor_config_0,
|
||||
POST_KERNEL, CONFIG_SPI_NOR_INIT_PRIORITY,
|
||||
&spi_nor_api);
|
||||
|
|
|
@ -666,7 +666,7 @@ static struct sx1509b_drv_data sx1509b_drvdata = {
|
|||
.lock = Z_SEM_INITIALIZER(sx1509b_drvdata.lock, 1, 1),
|
||||
};
|
||||
|
||||
DEVICE_DT_DEFINE(DT_DRV_INST(0), sx1509b_init, device_pm_control_nop,
|
||||
DEVICE_DT_INST_DEFINE(0, sx1509b_init, device_pm_control_nop,
|
||||
&sx1509b_drvdata, &sx1509b_cfg,
|
||||
POST_KERNEL, CONFIG_GPIO_SX1509B_INIT_PRIORITY,
|
||||
&api_table);
|
||||
|
|
|
@ -386,7 +386,7 @@ static const struct driver_config regulator_##id##_cfg = { \
|
|||
\
|
||||
static struct REG_DATA_TAG(id) regulator_##id##_data; \
|
||||
\
|
||||
DEVICE_DT_DEFINE(DT_DRV_INST(id), REG_INIT(id), device_pm_control_nop, \
|
||||
DEVICE_DT_INST_DEFINE(id, REG_INIT(id), device_pm_control_nop, \
|
||||
®ulator_##id##_data, ®ulator_##id##_cfg, \
|
||||
POST_KERNEL, CONFIG_REGULATOR_FIXED_INIT_PRIORITY, \
|
||||
®_API(id));
|
||||
|
|
|
@ -593,7 +593,7 @@ out:
|
|||
|
||||
static struct ccs811_data ccs811_driver;
|
||||
|
||||
DEVICE_DT_DEFINE(DT_DRV_INST(0), ccs811_init, device_pm_control_nop,
|
||||
DEVICE_DT_INST_DEFINE(0, ccs811_init, device_pm_control_nop,
|
||||
&ccs811_driver, NULL,
|
||||
POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY,
|
||||
&ccs811_driver_api);
|
||||
|
|
|
@ -52,7 +52,7 @@ BUILD_ASSERT((PROP(hw_flow_control) && HW_FLOW_CONTROL_AVAILABLE) ||
|
|||
|
||||
static NRF_UART_Type *const uart0_addr = (NRF_UART_Type *)DT_INST_REG_ADDR(0);
|
||||
|
||||
DEVICE_DT_DECLARE(DT_DRV_INST(0));
|
||||
DEVICE_DT_INST_DECLARE(0);
|
||||
|
||||
/* Device data structure */
|
||||
struct uart_nrfx_data {
|
||||
|
@ -1195,7 +1195,7 @@ static struct uart_nrfx_data uart_nrfx_uart0_data = {
|
|||
}
|
||||
};
|
||||
|
||||
DEVICE_DT_DEFINE(DT_DRV_INST(0),
|
||||
DEVICE_DT_INST_DEFINE(0,
|
||||
uart_nrfx_init,
|
||||
uart_nrfx_pm_control,
|
||||
&uart_nrfx_uart0_data,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue