diff --git a/boards/arm/thingy52_nrf52832/board.c b/boards/arm/thingy52_nrf52832/board.c index 3adbbb3f4cd..9d134e5683a 100644 --- a/boards/arm/thingy52_nrf52832/board.c +++ b/boards/arm/thingy52_nrf52832/board.c @@ -52,8 +52,10 @@ static const struct pwr_ctrl_cfg vdd_pwr_ctrl_cfg = { .pin = VDD_PWR_CTRL_GPIO_PIN, }; -DEVICE_INIT(vdd_pwr_ctrl_init, "", pwr_ctrl_init, NULL, &vdd_pwr_ctrl_cfg, - POST_KERNEL, CONFIG_BOARD_VDD_PWR_CTRL_INIT_PRIORITY); +DEVICE_DEFINE(vdd_pwr_ctrl_init, "", pwr_ctrl_init, NULL, NULL, + &vdd_pwr_ctrl_cfg, + POST_KERNEL, CONFIG_BOARD_VDD_PWR_CTRL_INIT_PRIORITY, + NULL); #ifdef CONFIG_SENSOR @@ -70,8 +72,8 @@ static const struct pwr_ctrl_cfg ccs_vdd_pwr_ctrl_cfg = { .pin = CCS_VDD_PWR_CTRL_GPIO_PIN, }; -DEVICE_INIT(ccs_vdd_pwr_ctrl_init, "", pwr_ctrl_init, NULL, - &ccs_vdd_pwr_ctrl_cfg, POST_KERNEL, - CONFIG_BOARD_CCS_VDD_PWR_CTRL_INIT_PRIORITY); +DEVICE_DEFINE(ccs_vdd_pwr_ctrl_init, "", pwr_ctrl_init, NULL, NULL, + &ccs_vdd_pwr_ctrl_cfg, POST_KERNEL, + CONFIG_BOARD_CCS_VDD_PWR_CTRL_INIT_PRIORITY, NULL); #endif diff --git a/drivers/gpio/gpio_stm32.c b/drivers/gpio/gpio_stm32.c index 61497d4e90c..91f348ac33a 100644 --- a/drivers/gpio/gpio_stm32.c +++ b/drivers/gpio/gpio_stm32.c @@ -649,6 +649,6 @@ static int gpio_stm32_afio_init(const struct device *device) return 0; } -DEVICE_INIT(gpio_stm32_afio, "", gpio_stm32_afio_init, NULL, NULL, PRE_KERNEL_2, 0); +SYS_DEVICE_DEFINE("gpio_stm32_afio", gpio_stm32_afio_init, NULL, PRE_KERNEL_2, 0); #endif /* CONFIG_SOC_SERIES_STM32F1X */ diff --git a/drivers/interrupt_controller/intc_exti_stm32.c b/drivers/interrupt_controller/intc_exti_stm32.c index 5f73132e34b..1cfffbf6de2 100644 --- a/drivers/interrupt_controller/intc_exti_stm32.c +++ b/drivers/interrupt_controller/intc_exti_stm32.c @@ -402,9 +402,10 @@ static int stm32_exti_init(const struct device *dev) } static struct stm32_exti_data exti_data; -DEVICE_INIT(exti_stm32, STM32_EXTI_NAME, stm32_exti_init, - &exti_data, NULL, - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); +DEVICE_DEFINE(exti_stm32, STM32_EXTI_NAME, stm32_exti_init, + NULL, &exti_data, NULL, + PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, + NULL); /** * @brief set & unset for the interrupt callbacks diff --git a/drivers/interrupt_controller/intc_sam0_eic.c b/drivers/interrupt_controller/intc_sam0_eic.c index d890f53441d..eb76351ff3f 100644 --- a/drivers/interrupt_controller/intc_sam0_eic.c +++ b/drivers/interrupt_controller/intc_sam0_eic.c @@ -413,6 +413,7 @@ static int sam0_eic_init(const struct device *dev) } static struct sam0_eic_data eic_data; -DEVICE_INIT(sam0_eic, DT_INST_LABEL(0), sam0_eic_init, - &eic_data, NULL, - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +DEVICE_DEFINE(sam0_eic, DT_INST_LABEL(0), sam0_eic_init, + NULL, &eic_data, NULL, + PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, + NULL); diff --git a/drivers/modem/gsm_ppp.c b/drivers/modem/gsm_ppp.c index bce41a48b81..7c0460e1bcd 100644 --- a/drivers/modem/gsm_ppp.c +++ b/drivers/modem/gsm_ppp.c @@ -789,5 +789,5 @@ static int gsm_init(const struct device *device) return 0; } -DEVICE_INIT(gsm_ppp, GSM_MODEM_DEVICE_NAME, gsm_init, &gsm, NULL, POST_KERNEL, - CONFIG_MODEM_GSM_INIT_PRIORITY); +DEVICE_DEFINE(gsm_ppp, GSM_MODEM_DEVICE_NAME, gsm_init, &gsm, NULL, NULL, + POST_KERNEL, CONFIG_MODEM_GSM_INIT_PRIORITY, NULL); diff --git a/samples/bluetooth/hci_spi/src/main.c b/samples/bluetooth/hci_spi/src/main.c index 526adcd0c4d..3525585283e 100644 --- a/samples/bluetooth/hci_spi/src/main.c +++ b/samples/bluetooth/hci_spi/src/main.c @@ -263,8 +263,8 @@ static int hci_spi_init(const struct device *unused) return 0; } -DEVICE_INIT(hci_spi, "hci_spi", &hci_spi_init, NULL, NULL, - APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); +SYS_DEVICE_DEFINE("hci_spi", hci_spi_init, NULL, + APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); void main(void) { diff --git a/samples/bluetooth/hci_uart/src/main.c b/samples/bluetooth/hci_uart/src/main.c index 07cdcc219b7..e5b9ded3a68 100644 --- a/samples/bluetooth/hci_uart/src/main.c +++ b/samples/bluetooth/hci_uart/src/main.c @@ -323,8 +323,8 @@ static int hci_uart_init(const struct device *unused) return 0; } -DEVICE_INIT(hci_uart, "hci_uart", &hci_uart_init, NULL, NULL, - APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); +SYS_DEVICE_DEFINE("hci_uart", hci_uart_init, NULL, + APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); void main(void) { diff --git a/tests/drivers/ipm/src/main.c b/tests/drivers/ipm/src/main.c index 2ee77df61f7..9e540887420 100644 --- a/tests/drivers/ipm/src/main.c +++ b/tests/drivers/ipm/src/main.c @@ -41,9 +41,9 @@ static struct ipm_console_sender_config_info sender_config = { .bind_to = "ipm_dummy0", .flags = SOURCE }; -DEVICE_INIT(ipm_console_send0, "ipm_send0", ipm_console_sender_init, - NULL, &sender_config, - APPLICATION, INIT_PRIO_IPM_SEND); +DEVICE_DEFINE(ipm_console_send0, "ipm_send0", ipm_console_sender_init, + NULL, NULL, &sender_config, + APPLICATION, INIT_PRIO_IPM_SEND, NULL); /* Receiving side of the console IPM driver. These numbers are * more or less arbitrary @@ -67,9 +67,9 @@ static struct ipm_console_receiver_config_info receiver_config = { }; struct ipm_console_receiver_runtime_data receiver_data; -DEVICE_INIT(ipm_console_recv0, "ipm_recv0", ipm_console_receiver_init, - &receiver_data, &receiver_config, - APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +DEVICE_DEFINE(ipm_console_recv0, "ipm_recv0", ipm_console_receiver_init, + NULL, &receiver_data, &receiver_config, + APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL); static const char thestr[] = "everything is awesome\n";