diff --git a/arch/arc/soc/quark_se_ss/soc.c b/arch/arc/soc/quark_se_ss/soc.c index 68d499dc51e..31ef9297fc9 100644 --- a/arch/arc/soc/quark_se_ss/soc.c +++ b/arch/arc/soc/quark_se_ss/soc.c @@ -49,5 +49,5 @@ static int quark_se_arc_init(struct device *arg) return 0; } DEVICE_INIT_CONFIG_DEFINE(quark_se_arc_0, "", quark_se_arc_init, NULL); -SYS_DEFINE_DEVICE(quark_se_arc_0, NULL, PRIMARY, +DEVICE_DEFINE(quark_se_arc_0, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); diff --git a/arch/arc/soc/quark_se_ss/soc_config.c b/arch/arc/soc/quark_se_ss/soc_config.c index 8eb1a0ef84b..b77449692d3 100644 --- a/arch/arc/soc/quark_se_ss/soc_config.c +++ b/arch/arc/soc/quark_se_ss/soc_config.c @@ -35,7 +35,7 @@ static struct quark_se_ipm_controller_config_info ipm_controller_config = { }; DEVICE_INIT_CONFIG_DEFINE(quark_se_ipm, "", quark_se_ipm_controller_initialize, &ipm_controller_config); -SYS_DEFINE_DEVICE(quark_se_ipm, NULL, SECONDARY, +DEVICE_DEFINE(quark_se_ipm, NULL, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); #if CONFIG_IPM_CONSOLE_SENDER @@ -49,7 +49,7 @@ struct ipm_console_sender_config_info quark_se_ipm_sender_config = { DEVICE_INIT_CONFIG_DEFINE(ipm_console, "ipm_console", ipm_console_sender_init, &quark_se_ipm_sender_config); -SYS_DEFINE_DEVICE(ipm_console, NULL, SECONDARY, CONFIG_IPM_CONSOLE_PRIORITY); +DEVICE_DEFINE(ipm_console, NULL, SECONDARY, CONFIG_IPM_CONSOLE_PRIORITY); #endif /* CONFIG_IPM_CONSOLE_SENDER */ #endif /* CONFIG_IPM_QUARK_SE */ @@ -74,7 +74,7 @@ static int uart_ns16550_init(struct device *dev) } DEVICE_INIT_CONFIG_DEFINE(uart_ns16550_init, "", uart_ns16550_init, NULL); -SYS_DEFINE_DEVICE(uart_ns16550_init, NULL, PRIMARY, +DEVICE_DEFINE(uart_ns16550_init, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); #endif /* CONFIG_UART_NS16550 */ diff --git a/arch/arm/soc/atmel_sam3/soc.c b/arch/arm/soc/atmel_sam3/soc.c index 9f5db7514d1..c84af161154 100644 --- a/arch/arm/soc/atmel_sam3/soc.c +++ b/arch/arm/soc/atmel_sam3/soc.c @@ -195,4 +195,4 @@ static int atmel_sam3_init(struct device *arg) } DEVICE_INIT_CONFIG_DEFINE(atmel_sam3_0, "", atmel_sam3_init, NULL); -SYS_DEFINE_DEVICE(atmel_sam3_0, NULL, PRIMARY, 0); +DEVICE_DEFINE(atmel_sam3_0, NULL, PRIMARY, 0); diff --git a/arch/arm/soc/fsl_frdm_k64f/soc.c b/arch/arm/soc/fsl_frdm_k64f/soc.c index 2d8c27436e4..b2cb65dc39e 100644 --- a/arch/arm/soc/fsl_frdm_k64f/soc.c +++ b/arch/arm/soc/fsl_frdm_k64f/soc.c @@ -321,4 +321,4 @@ static int fsl_frdm_k64f_init(struct device *arg) } DEVICE_INIT_CONFIG_DEFINE(fsl_frdm_0, "", fsl_frdm_k64f_init, NULL); -SYS_DEFINE_DEVICE(fsl_frdm_0, NULL, PRIMARY, 0); +DEVICE_DEFINE(fsl_frdm_0, NULL, PRIMARY, 0); diff --git a/arch/arm/soc/fsl_frdm_k64f/soc_config.c b/arch/arm/soc/fsl_frdm_k64f/soc_config.c index 110f946dcde..5fb5ac1bced 100644 --- a/arch/arm/soc/fsl_frdm_k64f/soc_config.c +++ b/arch/arm/soc/fsl_frdm_k64f/soc_config.c @@ -72,7 +72,7 @@ static int uart_k20_console_init(struct device *dev) } DEVICE_INIT_CONFIG_DEFINE(_uart_k20_console, "", uart_k20_console_init, NULL); -SYS_DEFINE_DEVICE(_uart_k20_console, NULL, PRIMARY, +DEVICE_DEFINE(_uart_k20_console, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); #endif @@ -118,7 +118,7 @@ static int uart_k20_init(struct device *dev) } DEVICE_INIT_CONFIG_DEFINE(_uart_k20_init, "", uart_k20_init, NULL); -SYS_DEFINE_DEVICE(_uart_k20_init, NULL, PRIMARY, +DEVICE_DEFINE(_uart_k20_init, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); #endif /* CONFIG_UART_K20 */ diff --git a/arch/arm/soc/ti_lm3s6965/soc.c b/arch/arm/soc/ti_lm3s6965/soc.c index 71c19168d0a..e1085096ad6 100644 --- a/arch/arm/soc/ti_lm3s6965/soc.c +++ b/arch/arm/soc/ti_lm3s6965/soc.c @@ -57,5 +57,5 @@ static int ti_lm3s6965_init(struct device *arg) } DEVICE_INIT_CONFIG_DEFINE(ti_lm3_0, "", ti_lm3s6965_init, NULL); -SYS_DEFINE_DEVICE(ti_lm3_0, NULL, PRIMARY, +DEVICE_DEFINE(ti_lm3_0, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); diff --git a/arch/arm/soc/ti_lm3s6965/soc_config.c b/arch/arm/soc/ti_lm3s6965/soc_config.c index 5d6bbb2f608..0f4f74ec43c 100644 --- a/arch/arm/soc/ti_lm3s6965/soc_config.c +++ b/arch/arm/soc/ti_lm3s6965/soc_config.c @@ -52,7 +52,7 @@ static int uart_stellaris_init(struct device *dev) } DEVICE_INIT_CONFIG_DEFINE(_uart_stellaris_en, "", uart_stellaris_init, NULL); -SYS_DEFINE_DEVICE(_uart_stellaris_en, NULL, PRIMARY, +DEVICE_DEFINE(_uart_stellaris_en, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_UART_STELLARIS */ diff --git a/arch/x86/core/cache.c b/arch/x86/core/cache.c index fab8a1b9377..971446783cb 100644 --- a/arch/x86/core/cache.c +++ b/arch/x86/core/cache.c @@ -108,6 +108,6 @@ static int init_cache(struct device *unused) } DEVICE_INIT_CONFIG_DEFINE(cache, "", init_cache, NULL); -SYS_DEFINE_DEVICE(cache, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +DEVICE_DEFINE(cache, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); #endif /* CONFIG_CLFLUSH_DETECT || CONFIG_CACHE_LINE_SIZE_DETECT */ diff --git a/arch/x86/soc/quark_d2000/soc.c b/arch/x86/soc/quark_d2000/soc.c index 798fd613012..072d193c728 100644 --- a/arch/x86/soc/quark_d2000/soc.c +++ b/arch/x86/soc/quark_d2000/soc.c @@ -63,10 +63,10 @@ static int quark_d2000_init(struct device *arg) return 0; } DEVICE_INIT_CONFIG_DEFINE(quark_d2000_0, "", quark_d2000_init, NULL); -SYS_DEFINE_DEVICE(quark_d2000_0, NULL, PRIMARY, +DEVICE_DEFINE(quark_d2000_0, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); #ifdef CONFIG_MVIC DEVICE_INIT_CONFIG_DEFINE(mvic_0, "", _mvic_init, NULL); -SYS_DEFINE_DEVICE(mvic_0, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +DEVICE_DEFINE(mvic_0, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); #endif /* CONFIG_IOAPIC */ diff --git a/arch/x86/soc/quark_se/soc.c b/arch/x86/soc/quark_se/soc.c index d1ca495b401..8d0a2445539 100644 --- a/arch/x86/soc/quark_se/soc.c +++ b/arch/x86/soc/quark_se/soc.c @@ -87,7 +87,7 @@ static int arc_init(struct device *arg) } DEVICE_INIT_CONFIG_DEFINE(quark_se_ss_0, "", arc_init, NULL); -SYS_DEFINE_DEVICE(quark_se_ss_0, NULL, SECONDARY, +DEVICE_DEFINE(quark_se_ss_0, NULL, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); #endif /*CONFIG_ARC_INIT*/ @@ -111,7 +111,7 @@ static int platform_uart_init(struct device *arg) } DEVICE_INIT_CONFIG_DEFINE(platform_uart_init, "", platform_uart_init, NULL); -SYS_DEFINE_DEVICE(platform_uart_init, NULL, PRIMARY, +DEVICE_DEFINE(platform_uart_init, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); #endif /* CONFIG_UART_INTERRUPT_DRIVEN */ diff --git a/arch/x86/soc/quark_se/soc_config.c b/arch/x86/soc/quark_se/soc_config.c index 033d423f905..045fb0de2f6 100644 --- a/arch/x86/soc/quark_se/soc_config.c +++ b/arch/x86/soc/quark_se/soc_config.c @@ -40,7 +40,7 @@ static struct quark_se_ipm_controller_config_info ipm_controller_config = { }; DEVICE_INIT_CONFIG_DEFINE(quark_se_ipm, "", quark_se_ipm_controller_initialize, &ipm_controller_config); -SYS_DEFINE_DEVICE(quark_se_ipm, NULL, PRIMARY, +DEVICE_DEFINE(quark_se_ipm, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #if defined(CONFIG_IPM_CONSOLE_RECEIVER) && defined(CONFIG_PRINTK) @@ -67,7 +67,7 @@ struct ipm_console_receiver_runtime_data quark_se_ipm_receiver_driver_data; DEVICE_INIT_CONFIG_DEFINE(ipm_console0, "ipm_console0", ipm_console_receiver_init, &quark_se_ipm_receiver_config); -SYS_DEFINE_DEVICE(ipm_console0, &quark_se_ipm_receiver_driver_data, +DEVICE_DEFINE(ipm_console0, &quark_se_ipm_receiver_driver_data, SECONDARY, CONFIG_IPM_CONSOLE_PRIORITY); #endif /* CONFIG_PRINTK && CONFIG_IPM_CONSOLE_RECEIVER */ diff --git a/arch/x86/soc/quark_x1000/soc.c b/arch/x86/soc/quark_x1000/soc.c index 707fd570009..3dd3010480d 100644 --- a/arch/x86/soc/quark_x1000/soc.c +++ b/arch/x86/soc/quark_x1000/soc.c @@ -68,6 +68,6 @@ static int pci_legacy_bridge_irq_config(struct device *unused) } DEVICE_INIT_CONFIG_DEFINE(pci_legacy_bridge_0, "", pci_legacy_bridge_irq_config, NULL); -SYS_DEFINE_DEVICE(pci_legacy_bridge_0, NULL, SECONDARY, +DEVICE_DEFINE(pci_legacy_bridge_0, NULL, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_PCI_LEGACY_BRIDGE */ diff --git a/boards/arduino_101/pinmux.c b/boards/arduino_101/pinmux.c index 35d60c7b5f2..c1e8ad917a7 100644 --- a/boards/arduino_101/pinmux.c +++ b/boards/arduino_101/pinmux.c @@ -367,4 +367,4 @@ DEVICE_INIT_CONFIG_DEFINE(pmux, /* config name */ &pinmux_initialize, /* init function */ &board_pmux); /* config options*/ -SYS_DEFINE_DEVICE(pmux, NULL, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +DEVICE_DEFINE(pmux, NULL, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); diff --git a/boards/galileo/galileo_pinmux.c b/boards/galileo/galileo_pinmux.c index ca992b12a5c..8be996cd582 100644 --- a/boards/galileo/galileo_pinmux.c +++ b/boards/galileo/galileo_pinmux.c @@ -784,5 +784,5 @@ struct galileo_data galileo_pinmux_driver = { * 1 - PCA9535 and PCAL9685 * 2 - pinmux */ -SYS_DEFINE_DEVICE(pmux, &galileo_pinmux_driver, SECONDARY, +DEVICE_DEFINE(pmux, &galileo_pinmux_driver, SECONDARY, CONFIG_PINMUX_INIT_PRIORITY); diff --git a/boards/quark_d2000_crb/pinmux.c b/boards/quark_d2000_crb/pinmux.c index 4b222d1d9e1..443f557af21 100644 --- a/boards/quark_d2000_crb/pinmux.c +++ b/boards/quark_d2000_crb/pinmux.c @@ -293,4 +293,4 @@ DEVICE_INIT_CONFIG_DEFINE(pmux, /* config name */ &pinmux_initialize, /* init function */ &board_pmux); /* config options*/ -SYS_DEFINE_DEVICE(pmux, NULL, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +DEVICE_DEFINE(pmux, NULL, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); diff --git a/boards/quark_se_ctb/pinmux.c b/boards/quark_se_ctb/pinmux.c index c0d61637801..21dc47e0d5d 100644 --- a/boards/quark_se_ctb/pinmux.c +++ b/boards/quark_se_ctb/pinmux.c @@ -350,4 +350,4 @@ DEVICE_INIT_CONFIG_DEFINE(pmux, /* config name */ &pinmux_initialize, /* init function */ &board_pmux); /* config options*/ -SYS_DEFINE_DEVICE(pmux, NULL, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +DEVICE_DEFINE(pmux, NULL, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); diff --git a/boards/quark_se_devboard/pinmux.c b/boards/quark_se_devboard/pinmux.c index 6fe8396791e..ddded3d6ec0 100644 --- a/boards/quark_se_devboard/pinmux.c +++ b/boards/quark_se_devboard/pinmux.c @@ -352,4 +352,4 @@ DEVICE_INIT_CONFIG_DEFINE(pmux, /* config name */ &pinmux_initialize, /* init function */ &board_pmux); /* config options*/ -SYS_DEFINE_DEVICE(pmux, NULL, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +DEVICE_DEFINE(pmux, NULL, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); diff --git a/drivers/adc/adc_dw.c b/drivers/adc/adc_dw.c index 23b3c9a7ed4..c2e46d3a567 100644 --- a/drivers/adc/adc_dw.c +++ b/drivers/adc/adc_dw.c @@ -534,7 +534,7 @@ DEVICE_INIT_CONFIG_DEFINE(adc_dw_0, /* config name*/ &adc_dw_init, /* init function*/ &adc_config_dev_0); /* config options*/ -SYS_DEFINE_DEVICE(adc_dw_0, &adc_info_dev_0, SECONDARY, +DEVICE_DEFINE(adc_dw_0, &adc_info_dev_0, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); static void adc_config_0_irq(void) diff --git a/drivers/adc/adc_ti_adc108s102.c b/drivers/adc/adc_ti_adc108s102.c index 17eb25fd651..b7c24a6944e 100644 --- a/drivers/adc/adc_ti_adc108s102.c +++ b/drivers/adc/adc_ti_adc108s102.c @@ -246,7 +246,7 @@ struct ti_adc108s102_config adc108s102_0_config = { DEVICE_INIT_CONFIG_DEFINE(adc108s102_0, CONFIG_ADC_TI_ADC108S102_0_DRV_NAME, ti_adc108s102_init, &adc108s102_0_config); -SYS_DEFINE_DEVICE(adc108s102_0, &adc108s102_0_data, SECONDARY, +DEVICE_DEFINE(adc108s102_0, &adc108s102_0_data, SECONDARY, CONFIG_ADC_TI_ADC108S102_INIT_PRIORITY); #endif /* CONFIG_ADC_TI_ADC108S102_0 */ diff --git a/drivers/aio/aio_dw_comparator.c b/drivers/aio/aio_dw_comparator.c index 799f756f7d9..5765b181f17 100644 --- a/drivers/aio/aio_dw_comparator.c +++ b/drivers/aio/aio_dw_comparator.c @@ -210,7 +210,7 @@ struct dw_aio_cmp_dev_data_t dw_aio_cmp_dev_data = { .num_cmp = AIO_DW_CMP_COUNT, }; -SYS_DEFINE_DEVICE(dw_aio_cmp, &dw_aio_cmp_dev_data, SECONDARY, +DEVICE_DEFINE(dw_aio_cmp, &dw_aio_cmp_dev_data, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); static int dw_aio_cmp_config(struct device *dev) diff --git a/drivers/bluetooth/h4.c b/drivers/bluetooth/h4.c index 1de024e5be6..ed04148d316 100644 --- a/drivers/bluetooth/h4.c +++ b/drivers/bluetooth/h4.c @@ -260,5 +260,5 @@ static int _bt_uart_init(struct device *unused) } DEVICE_INIT_CONFIG_DEFINE(bt_uart, "", _bt_uart_init, NULL); -SYS_DEFINE_DEVICE(bt_uart, NULL, NANOKERNEL, +DEVICE_DEFINE(bt_uart, NULL, NANOKERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); diff --git a/drivers/bluetooth/h5.c b/drivers/bluetooth/h5.c index 337514b9edb..75d7c01f180 100644 --- a/drivers/bluetooth/h5.c +++ b/drivers/bluetooth/h5.c @@ -791,5 +791,5 @@ static int _bt_uart_init(struct device *unused) } DEVICE_INIT_CONFIG_DEFINE(bt_uart, "", _bt_uart_init, NULL); -SYS_DEFINE_DEVICE(bt_uart, NULL, NANOKERNEL, +DEVICE_DEFINE(bt_uart, NULL, NANOKERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); diff --git a/drivers/clock_control/quark_se_clock_control.c b/drivers/clock_control/quark_se_clock_control.c index be13e746293..0ebad56e6dd 100644 --- a/drivers/clock_control/quark_se_clock_control.c +++ b/drivers/clock_control/quark_se_clock_control.c @@ -106,7 +106,7 @@ DEVICE_INIT_CONFIG_DEFINE(clock_quark_se_peripheral, &quark_se_clock_control_init, &clock_quark_se_peripheral_config); -SYS_DEFINE_DEVICE(clock_quark_se_peripheral, NULL, PRIMARY, +DEVICE_DEFINE(clock_quark_se_peripheral, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_CLOCK_CONTROL_QUARK_SE_PERIPHERAL */ @@ -121,7 +121,7 @@ DEVICE_INIT_CONFIG_DEFINE(clock_quark_se_external, &quark_se_clock_control_init, &clock_quark_se_external_config); -SYS_DEFINE_DEVICE(clock_quark_se_external, NULL, PRIMARY, +DEVICE_DEFINE(clock_quark_se_external, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_CLOCK_CONTROL_QUARK_SE_EXTERNAL */ @@ -136,6 +136,6 @@ DEVICE_INIT_CONFIG_DEFINE(clock_quark_se_sensor, &quark_se_clock_control_init, &clock_quark_se_sensor_config); -SYS_DEFINE_DEVICE(clock_quark_se_sensor, NULL, PRIMARY, +DEVICE_DEFINE(clock_quark_se_sensor, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_CLOCK_CONTROL_QUARK_SE_SENSOR */ diff --git a/drivers/console/ram_console.c b/drivers/console/ram_console.c index 6e9e44803dc..434045d29b4 100644 --- a/drivers/console/ram_console.c +++ b/drivers/console/ram_console.c @@ -46,5 +46,5 @@ static int ram_console_init(struct device *d) } DEVICE_INIT_CONFIG_DEFINE(ram_console, "", ram_console_init, NULL); -SYS_DEFINE_DEVICE(ram_console, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +DEVICE_DEFINE(ram_console, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); diff --git a/drivers/console/uart_console.c b/drivers/console/uart_console.c index 698e117c0d9..c7b55bf84f5 100644 --- a/drivers/console/uart_console.c +++ b/drivers/console/uart_console.c @@ -433,7 +433,7 @@ DEVICE_INIT_CONFIG_DEFINE(uart_console, "", uart_console_init, NULL); /* UART consloe initializes after the UART device itself */ #if defined(CONFIG_EARLY_CONSOLE) -SYS_DEFINE_DEVICE(uart_console, NULL, PRIMARY, CONFIG_UART_CONSOLE_PRIORITY); +DEVICE_DEFINE(uart_console, NULL, PRIMARY, CONFIG_UART_CONSOLE_PRIORITY); #else -SYS_DEFINE_DEVICE(uart_console, NULL, SECONDARY, CONFIG_UART_CONSOLE_PRIORITY); +DEVICE_DEFINE(uart_console, NULL, SECONDARY, CONFIG_UART_CONSOLE_PRIORITY); #endif diff --git a/drivers/ethernet/eth_dw.c b/drivers/ethernet/eth_dw.c index d5d7cd7ab99..6db8f07f1fe 100644 --- a/drivers/ethernet/eth_dw.c +++ b/drivers/ethernet/eth_dw.c @@ -305,7 +305,7 @@ static struct eth_runtime eth_0_runtime; DEVICE_INIT_CONFIG_DEFINE(eth_dw_0, CONFIG_ETH_DW_0_NAME, eth_initialize, ð_config_0); -SYS_DEFINE_DEVICE(eth_dw_0, ð_0_runtime, NANOKERNEL, +DEVICE_DEFINE(eth_dw_0, ð_0_runtime, NANOKERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); static int eth_net_tx(struct net_buf *buf) diff --git a/drivers/gpio/gpio_dw.c b/drivers/gpio/gpio_dw.c index a0cd628403a..e94a2af9ed7 100644 --- a/drivers/gpio/gpio_dw.c +++ b/drivers/gpio/gpio_dw.c @@ -450,7 +450,7 @@ struct gpio_dw_runtime gpio_0_runtime; DEVICE_INIT_CONFIG_DEFINE(gpio_dw_0, CONFIG_GPIO_DW_0_NAME, gpio_dw_initialize, &gpio_config_0); -SYS_DEFINE_DEVICE(gpio_dw_0, &gpio_0_runtime, SECONDARY, +DEVICE_DEFINE(gpio_dw_0, &gpio_0_runtime, SECONDARY, CONFIG_GPIO_DW_INIT_PRIORITY); #ifdef CONFIG_GPIO_DW_0_IRQ_DIRECT @@ -526,7 +526,7 @@ struct gpio_dw_runtime gpio_1_runtime; DEVICE_INIT_CONFIG_DEFINE(gpio_dw_1, CONFIG_GPIO_DW_1_NAME, gpio_dw_initialize, &gpio_dw_config_1); -SYS_DEFINE_DEVICE(gpio_dw_1, &gpio_1_runtime, SECONDARY, +DEVICE_DEFINE(gpio_dw_1, &gpio_1_runtime, SECONDARY, CONFIG_GPIO_DW_INIT_PRIORITY); #ifdef CONFIG_GPIO_DW_1_IRQ_DIRECT diff --git a/drivers/gpio/gpio_mmio.c b/drivers/gpio/gpio_mmio.c index 4830bba3fe0..d8a66348011 100644 --- a/drivers/gpio/gpio_mmio.c +++ b/drivers/gpio/gpio_mmio.c @@ -342,7 +342,7 @@ DEVICE_INIT_CONFIG_DEFINE(gpio_mmio_0, CONFIG_GPIO_MMIO_0_DEV_NAME, gpio_mmio_init, &gpio_mmio_0_cfg); -SYS_DEFINE_DEVICE(gpio_mmio_0, (void *)0, SECONDARY, +DEVICE_DEFINE(gpio_mmio_0, (void *)0, SECONDARY, CONFIG_GPIO_MMIO_INIT_PRIORITY); #endif /* CONFIG_GPIO_MMIO_0 */ @@ -375,7 +375,7 @@ DEVICE_INIT_CONFIG_DEFINE(gpio_mmio_1, CONFIG_GPIO_MMIO_1_DEV_NAME, gpio_mmio_init, &gpio_mmio_1_cfg); -SYS_DEFINE_DEVICE(gpio_mmio_1, (void *)0, SECONDARY, +DEVICE_DEFINE(gpio_mmio_1, (void *)0, SECONDARY, CONFIG_GPIO_MMIO_INIT_PRIORITY); #endif /* CONFIG_GPIO_MMIO_1 */ diff --git a/drivers/gpio/gpio_pcal9535a.c b/drivers/gpio/gpio_pcal9535a.c index 09423e6da57..db2acc720f4 100644 --- a/drivers/gpio/gpio_pcal9535a.c +++ b/drivers/gpio/gpio_pcal9535a.c @@ -622,7 +622,7 @@ DEVICE_INIT_CONFIG_DEFINE(gpio_pcal9535a_0, gpio_pcal9535a_init, &gpio_pcal9535a_0_cfg); /* This has to init after I2C master */ -SYS_DEFINE_DEVICE(gpio_pcal9535a_0, &gpio_pcal9535a_0_drvdata, SECONDARY, +DEVICE_DEFINE(gpio_pcal9535a_0, &gpio_pcal9535a_0_drvdata, SECONDARY, CONFIG_GPIO_PCAL9535A_INIT_PRIORITY); #endif /* CONFIG_GPIO_PCAL9535A_0 */ @@ -651,7 +651,7 @@ DEVICE_INIT_CONFIG_DEFINE(gpio_pcal9535a_1, gpio_pcal9535a_init, &gpio_pcal9535a_1_cfg); /* This has to init after I2C master */ -SYS_DEFINE_DEVICE(gpio_pcal9535a_1, &gpio_pcal9535a_1_drvdata, SECONDARY, +DEVICE_DEFINE(gpio_pcal9535a_1, &gpio_pcal9535a_1_drvdata, SECONDARY, CONFIG_GPIO_PCAL9535A_INIT_PRIORITY); #endif /* CONFIG_GPIO_PCAL9535A_1 */ @@ -680,7 +680,7 @@ DEVICE_INIT_CONFIG_DEFINE(gpio_pcal9535a_2, gpio_pcal9535a_init, &gpio_pcal9535a_2_cfg); /* This has to init after I2C master */ -SYS_DEFINE_DEVICE(gpio_pcal9535a_2, &gpio_pcal9535a_2_drvdata, SECONDARY, +DEVICE_DEFINE(gpio_pcal9535a_2, &gpio_pcal9535a_2_drvdata, SECONDARY, CONFIG_GPIO_PCAL9535A_INIT_PRIORITY); #endif /* CONFIG_GPIO_PCAL9535A_2 */ @@ -709,7 +709,7 @@ DEVICE_INIT_CONFIG_DEFINE(gpio_pcal9535a_3, gpio_pcal9535a_init, &gpio_pcal9535a_3_cfg); /* This has to init after I2C master */ -SYS_DEFINE_DEVICE(gpio_pcal9535a_3, &gpio_pcal9535a_3_drvdata, SECONDARY, +DEVICE_DEFINE(gpio_pcal9535a_3, &gpio_pcal9535a_3_drvdata, SECONDARY, CONFIG_GPIO_PCAL9535A_INIT_PRIORITY); #endif /* CONFIG_GPIO_PCAL9535A_3 */ diff --git a/drivers/gpio/gpio_qmsi.c b/drivers/gpio/gpio_qmsi.c index 2b09696b43e..6be27ad1d0e 100644 --- a/drivers/gpio/gpio_qmsi.c +++ b/drivers/gpio/gpio_qmsi.c @@ -280,5 +280,5 @@ static struct gpio_qmsi_runtime gpio_0_runtime; DEVICE_INIT_CONFIG_DEFINE(gpio_0, CONFIG_GPIO_QMSI_0_NAME, &gpio_qmsi_init, &gpio_0_config); -SYS_DEFINE_DEVICE(gpio_0, &gpio_0_runtime, SECONDARY, +DEVICE_DEFINE(gpio_0, &gpio_0_runtime, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); diff --git a/drivers/gpio/gpio_sch.c b/drivers/gpio/gpio_sch.c index 63bfdb0f067..62751bc6ad7 100644 --- a/drivers/gpio/gpio_sch.c +++ b/drivers/gpio/gpio_sch.c @@ -361,7 +361,7 @@ struct gpio_sch_data gpio_data_0; DEVICE_INIT_CONFIG_DEFINE(gpio_0, CONFIG_GPIO_SCH_0_DEV_NAME, gpio_sch_init, &gpio_sch_0_config); -SYS_DEFINE_DEVICE(gpio_0, &gpio_data_0, SECONDARY, +DEVICE_DEFINE(gpio_0, &gpio_data_0, SECONDARY, CONFIG_GPIO_SCH_INIT_PRIORITY); #endif /* CONFIG_GPIO_SCH_0 */ @@ -376,7 +376,7 @@ struct gpio_sch_data gpio_data_1; DEVICE_INIT_CONFIG_DEFINE(gpio_1, CONFIG_GPIO_SCH_1_DEV_NAME, gpio_sch_init, &gpio_sch_1_config); -SYS_DEFINE_DEVICE(gpio_1, &gpio_data_1, SECONDARY, +DEVICE_DEFINE(gpio_1, &gpio_data_1, SECONDARY, CONFIG_GPIO_SCH_INIT_PRIORITY); #endif /* CONFIG_GPIO_SCH_1 */ diff --git a/drivers/grove/lcd_rgb.c b/drivers/grove/lcd_rgb.c index befc766add9..f68b5965251 100644 --- a/drivers/grove/lcd_rgb.c +++ b/drivers/grove/lcd_rgb.c @@ -359,5 +359,5 @@ DEVICE_INIT_CONFIG_DEFINE(grove_lcd, glcd_initialize, &grove_lcd_config); -SYS_DEFINE_DEVICE(grove_lcd, &grove_lcd_driver, NANOKERNEL, +DEVICE_DEFINE(grove_lcd, &grove_lcd_driver, NANOKERNEL, CONFIG_GROVE_LCD_RGB_INIT_PRIORITY); diff --git a/drivers/i2c/i2c_dw.c b/drivers/i2c/i2c_dw.c index 1c974175b22..102e43c581a 100644 --- a/drivers/i2c/i2c_dw.c +++ b/drivers/i2c/i2c_dw.c @@ -778,7 +778,7 @@ DEVICE_INIT_CONFIG_DEFINE(i2c_0, &i2c_dw_initialize, &i2c_config_dw_0); -SYS_DEFINE_DEVICE(i2c_0, &i2c_0_runtime, SECONDARY, CONFIG_I2C_INIT_PRIORITY); +DEVICE_DEFINE(i2c_0, &i2c_0_runtime, SECONDARY, CONFIG_I2C_INIT_PRIORITY); void i2c_config_0(struct device *port) { @@ -831,7 +831,7 @@ DEVICE_INIT_CONFIG_DEFINE(i2c_1, &i2c_dw_initialize, &i2c_config_dw_1); -SYS_DEFINE_DEVICE(i2c_1, &i2c_1_runtime, SECONDARY, +DEVICE_DEFINE(i2c_1, &i2c_1_runtime, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); void i2c_config_1(struct device *port) diff --git a/drivers/i2c/i2c_qmsi.c b/drivers/i2c/i2c_qmsi.c index 92c09463fc7..efd20a2555d 100644 --- a/drivers/i2c/i2c_qmsi.c +++ b/drivers/i2c/i2c_qmsi.c @@ -118,4 +118,4 @@ static int i2c_qmsi_init(struct device *dev) DEVICE_INIT_CONFIG_DEFINE(i2c_qmsi_0, CONFIG_I2C_QMSI_0_NAME, i2c_qmsi_init, NULL); -SYS_DEFINE_DEVICE(i2c_qmsi_0, 0, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); +DEVICE_DEFINE(i2c_qmsi_0, 0, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); diff --git a/drivers/i2c/i2c_quark_se_ss.c b/drivers/i2c/i2c_quark_se_ss.c index b24d8878b8d..cbf0fe5f4d6 100644 --- a/drivers/i2c/i2c_quark_se_ss.c +++ b/drivers/i2c/i2c_quark_se_ss.c @@ -662,7 +662,7 @@ DEVICE_INIT_CONFIG_DEFINE(i2c_ss_0, &i2c_qse_ss_initialize, &i2c_config_ss_0); -SYS_DEFINE_DEVICE(i2c_ss_0, &i2c_ss_0_runtime, +DEVICE_DEFINE(i2c_ss_0, &i2c_ss_0_runtime, SECONDARY, CONFIG_I2C_INIT_PRIORITY); void _i2c_qse_ss_config_irq_0(struct device *port) @@ -727,7 +727,7 @@ DEVICE_INIT_CONFIG_DEFINE(i2c_ss_1, &i2c_qse_ss_initialize, &i2c_config_ss_1); -SYS_DEFINE_DEVICE(i2c_ss_1, &i2c_qse_ss_1_runtime, +DEVICE_DEFINE(i2c_ss_1, &i2c_qse_ss_1_runtime, SECONDARY, CONFIG_I2C_INIT_PRIORITY); diff --git a/drivers/interrupt_controller/i8259.c b/drivers/interrupt_controller/i8259.c index 5d21fb741d7..2a982a5ec2f 100644 --- a/drivers/interrupt_controller/i8259.c +++ b/drivers/interrupt_controller/i8259.c @@ -63,5 +63,5 @@ int _i8259_init(struct device *unused) } DEVICE_INIT_CONFIG_DEFINE(pic_0, "", _i8259_init, NULL); -SYS_DEFINE_DEVICE(pic_0, NULL, PRIMARY, +DEVICE_DEFINE(pic_0, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); diff --git a/drivers/interrupt_controller/ioapic_intr.c b/drivers/interrupt_controller/ioapic_intr.c index 453dbdcb429..f45987fd280 100644 --- a/drivers/interrupt_controller/ioapic_intr.c +++ b/drivers/interrupt_controller/ioapic_intr.c @@ -315,5 +315,5 @@ static void _IoApicRedUpdateLo(unsigned int irq, } DEVICE_INIT_CONFIG_DEFINE(ioapic_0, "", _ioapic_init, NULL); -SYS_DEFINE_DEVICE(ioapic_0, NULL, PRIMARY, +DEVICE_DEFINE(ioapic_0, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); diff --git a/drivers/interrupt_controller/loapic_intr.c b/drivers/interrupt_controller/loapic_intr.c index ddf94e6837c..439635c5b07 100644 --- a/drivers/interrupt_controller/loapic_intr.c +++ b/drivers/interrupt_controller/loapic_intr.c @@ -445,7 +445,7 @@ int _loapic_isr_vector_get(void) } DEVICE_INIT_CONFIG_DEFINE(loapic_0, "", _loapic_init, NULL); -SYS_DEFINE_DEVICE(loapic_0, NULL, PRIMARY, +DEVICE_DEFINE(loapic_0, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); #if CONFIG_LOAPIC_SPURIOUS_VECTOR diff --git a/drivers/ipm/ipm_quark_se.h b/drivers/ipm/ipm_quark_se.h index 5d51c3440c9..f0de7fb5e66 100644 --- a/drivers/ipm/ipm_quark_se.h +++ b/drivers/ipm/ipm_quark_se.h @@ -140,7 +140,7 @@ int quark_se_ipm_controller_initialize(struct device *d); DEVICE_INIT_CONFIG_DEFINE(name, _STRINGIFY(name), \ quark_se_ipm_initialize, \ &quark_se_ipm_config_##name); \ - SYS_DEFINE_DEVICE(name, &quark_se_ipm_runtime_##name, SECONDARY, \ + DEVICE_DEFINE(name, &quark_se_ipm_runtime_##name, SECONDARY, \ CONFIG_KERNEL_INIT_PRIORITY_DEFAULT) #ifdef __cplusplus diff --git a/drivers/pwm/pwm_dw.c b/drivers/pwm/pwm_dw.c index 79f98337b98..eb1e05bdb94 100644 --- a/drivers/pwm/pwm_dw.c +++ b/drivers/pwm/pwm_dw.c @@ -250,7 +250,7 @@ DEVICE_INIT_CONFIG_DEFINE(pwm_dw_0, CONFIG_PWM_DW_DEV_NAME, pwm_dw_init, &pwm_dw_cfg); -SYS_DEFINE_DEVICE(pwm_dw_0, NULL, SECONDARY, +DEVICE_DEFINE(pwm_dw_0, NULL, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_PWM_DW */ diff --git a/drivers/pwm/pwm_pca9685.c b/drivers/pwm/pwm_pca9685.c index f8b7816e9ed..ec9eabd1ae9 100644 --- a/drivers/pwm/pwm_pca9685.c +++ b/drivers/pwm/pwm_pca9685.c @@ -235,7 +235,7 @@ DEVICE_INIT_CONFIG_DEFINE(pwm_pca9685_0, pwm_pca9685_init, &pwm_pca9685_0_cfg); /* This has to init after I2C master */ -SYS_DEFINE_DEVICE(pwm_pca9685_0, &pwm_pca9685_0_drvdata, SECONDARY, +DEVICE_DEFINE(pwm_pca9685_0, &pwm_pca9685_0_drvdata, SECONDARY, CONFIG_PWM_PCA9685_INIT_PRIORITY); #endif /* CONFIG_PWM_PCA9685_0 */ diff --git a/drivers/rtc/rtc_dw.c b/drivers/rtc/rtc_dw.c index 3028de01eee..1c3f5a4622a 100644 --- a/drivers/rtc/rtc_dw.c +++ b/drivers/rtc/rtc_dw.c @@ -203,7 +203,7 @@ struct rtc_dw_dev_config rtc_dev = { DEVICE_INIT_CONFIG_DEFINE(rtc, CONFIG_RTC_DRV_NAME, &rtc_dw_init, &rtc_dev); -SYS_DEFINE_DEVICE(rtc, &rtc_runtime, SECONDARY, +DEVICE_DEFINE(rtc, &rtc_runtime, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); int rtc_dw_init(struct device *dev) diff --git a/drivers/rtc/rtc_qmsi.c b/drivers/rtc/rtc_qmsi.c index 7f6d6315294..d7e94df2941 100644 --- a/drivers/rtc/rtc_qmsi.c +++ b/drivers/rtc/rtc_qmsi.c @@ -95,7 +95,7 @@ static int rtc_qmsi_init(struct device *dev) DEVICE_INIT_CONFIG_DEFINE(rtc, CONFIG_RTC_DRV_NAME, &rtc_qmsi_init, NULL); -SYS_DEFINE_DEVICE(rtc, NULL, SECONDARY, +DEVICE_DEFINE(rtc, NULL, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); static struct device *rtc_qmsi_dev = SYS_GET_DEVICE(rtc); diff --git a/drivers/serial/uart_atmel_sam3.c b/drivers/serial/uart_atmel_sam3.c index 0747d725f5c..4658a578d84 100644 --- a/drivers/serial/uart_atmel_sam3.c +++ b/drivers/serial/uart_atmel_sam3.c @@ -264,5 +264,5 @@ DEVICE_INIT_CONFIG_DEFINE(uart_sam3_0, &uart_sam3_init, &uart_sam3_dev_cfg_0); -SYS_DEFINE_DEVICE(uart_sam3_0, &uart_sam3_dev_data_0, +DEVICE_DEFINE(uart_sam3_0, &uart_sam3_dev_data_0, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); diff --git a/drivers/serial/uart_k20.c b/drivers/serial/uart_k20.c index 867b1064763..4f688e6fdfa 100644 --- a/drivers/serial/uart_k20.c +++ b/drivers/serial/uart_k20.c @@ -381,7 +381,7 @@ DEVICE_INIT_CONFIG_DEFINE(uart_k20_0, &uart_k20_init, &uart_k20_dev_cfg_0); -SYS_DEFINE_DEVICE(uart_k20_0, &uart_k20_dev_data_0, PRIMARY, +DEVICE_DEFINE(uart_k20_0, &uart_k20_dev_data_0, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_UART_K20_PORT_0 */ @@ -402,7 +402,7 @@ DEVICE_INIT_CONFIG_DEFINE(uart_k20_1, &uart_k20_init, &uart_k20_dev_cfg_1); -SYS_DEFINE_DEVICE(uart_k20_1, &uart_k20_dev_data_1, PRIMARY, +DEVICE_DEFINE(uart_k20_1, &uart_k20_dev_data_1, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_UART_K20_PORT_1 */ @@ -423,7 +423,7 @@ DEVICE_INIT_CONFIG_DEFINE(uart_k20_2, &uart_k20_init, &uart_k20_dev_cfg_2); -SYS_DEFINE_DEVICE(uart_k20_2, &uart_k20_dev_data_2, PRIMARY, +DEVICE_DEFINE(uart_k20_2, &uart_k20_dev_data_2, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_UART_K20_PORT_2 */ @@ -444,7 +444,7 @@ DEVICE_INIT_CONFIG_DEFINE(uart_k20_3, &uart_k20_init, &uart_k20_dev_cfg_3); -SYS_DEFINE_DEVICE(uart_k20_3, &uart_k20_dev_data_3, PRIMARY, +DEVICE_DEFINE(uart_k20_3, &uart_k20_dev_data_3, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_UART_K20_PORT_3 */ @@ -465,7 +465,7 @@ DEVICE_INIT_CONFIG_DEFINE(uart_k20_4, &uart_k20_init, &uart_k20_dev_cfg_4); -SYS_DEFINE_DEVICE(uart_k20_4, &uart_k20_dev_data_4, PRIMARY, +DEVICE_DEFINE(uart_k20_4, &uart_k20_dev_data_4, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_UART_K20_PORT_4 */ diff --git a/drivers/serial/uart_ns16550.c b/drivers/serial/uart_ns16550.c index 636c3facd86..3c8896e04ef 100644 --- a/drivers/serial/uart_ns16550.c +++ b/drivers/serial/uart_ns16550.c @@ -707,7 +707,7 @@ DEVICE_INIT_CONFIG_DEFINE(uart_ns16550_0, &uart_ns16550_init, &uart_ns16550_dev_cfg_0); -SYS_DEFINE_DEVICE(uart_ns16550_0, &uart_ns16550_dev_data_0, +DEVICE_DEFINE(uart_ns16550_0, &uart_ns16550_dev_data_0, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_UART_NS16550_PORT_0 */ @@ -743,7 +743,7 @@ DEVICE_INIT_CONFIG_DEFINE(uart_ns16550_1, &uart_ns16550_init, &uart_ns16550_dev_cfg_1); -SYS_DEFINE_DEVICE(uart_ns16550_1, &uart_ns16550_dev_data_1, +DEVICE_DEFINE(uart_ns16550_1, &uart_ns16550_dev_data_1, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_UART_NS16550_PORT_1 */ diff --git a/drivers/serial/uart_nsim.c b/drivers/serial/uart_nsim.c index 1d6165bde0f..944d51ce188 100644 --- a/drivers/serial/uart_nsim.c +++ b/drivers/serial/uart_nsim.c @@ -88,5 +88,5 @@ DEVICE_INIT_CONFIG_DEFINE(uart_nsim0, &uart_nsim_init, &uart_nsim_dev_cfg_0); -SYS_DEFINE_DEVICE(uart_nsim0, NULL, PRIMARY, +DEVICE_DEFINE(uart_nsim0, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); diff --git a/drivers/serial/uart_stellaris.c b/drivers/serial/uart_stellaris.c index b148afbe36f..91628940b33 100644 --- a/drivers/serial/uart_stellaris.c +++ b/drivers/serial/uart_stellaris.c @@ -607,7 +607,7 @@ DEVICE_INIT_CONFIG_DEFINE(uart_stellaris0, &uart_stellaris_init, &uart_stellaris_dev_cfg_0); -SYS_DEFINE_DEVICE(uart_stellaris0, &uart_stellaris_dev_data_0, PRIMARY, +DEVICE_DEFINE(uart_stellaris0, &uart_stellaris_dev_data_0, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_UART_STELLARIS_PORT_0 */ @@ -628,7 +628,7 @@ DEVICE_INIT_CONFIG_DEFINE(uart_stellaris1, &uart_stellaris_init, &uart_stellaris_dev_cfg_1); -SYS_DEFINE_DEVICE(uart_stellaris1, &uart_stellaris_dev_data_1, PRIMARY, +DEVICE_DEFINE(uart_stellaris1, &uart_stellaris_dev_data_1, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_UART_STELLARIS_PORT_1 */ @@ -649,7 +649,7 @@ DEVICE_INIT_CONFIG_DEFINE(uart_stellaris2, &uart_stellaris_init, &uart_stellaris_dev_cfg_2); -SYS_DEFINE_DEVICE(uart_stellaris2, &uart_stellaris_dev_data_2, PRIMARY, +DEVICE_DEFINE(uart_stellaris2, &uart_stellaris_dev_data_2, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #endif /* CONFIG_UART_STELLARIS_PORT_2 */ diff --git a/drivers/shared_irq/shared_irq.c b/drivers/shared_irq/shared_irq.c index 7319ae5e7ab..7dbf4c2620c 100644 --- a/drivers/shared_irq/shared_irq.c +++ b/drivers/shared_irq/shared_irq.c @@ -146,7 +146,7 @@ struct shared_irq_runtime shared_irq_0_runtime; DEVICE_INIT_CONFIG_DEFINE(shared_irq_0, CONFIG_SHARED_IRQ_0_NAME, shared_irq_initialize, &shared_irq_config_0); -SYS_DEFINE_DEVICE(shared_irq_0, &shared_irq_0_runtime, SECONDARY, +DEVICE_DEFINE(shared_irq_0, &shared_irq_0_runtime, SECONDARY, CONFIG_SHARED_IRQ_INIT_PRIORITY); #if defined(CONFIG_IOAPIC) @@ -187,7 +187,7 @@ struct shared_irq_runtime shared_irq_1_runtime; DEVICE_INIT_CONFIG_DEFINE(shared_irq_1, CONFIG_SHARED_IRQ_1_NAME, shared_irq_initialize, &shared_irq_config_1); -SYS_DEFINE_DEVICE(shared_irq_1, &shared_irq_1_runtime, SECONDARY, +DEVICE_DEFINE(shared_irq_1, &shared_irq_1_runtime, SECONDARY, CONFIG_SHARED_IRQ_INIT_PRIORITY); #if defined(CONFIG_IOAPIC) diff --git a/drivers/spi/spi_dw.c b/drivers/spi/spi_dw.c index 0c508087c7d..01058387cd9 100644 --- a/drivers/spi/spi_dw.c +++ b/drivers/spi/spi_dw.c @@ -585,7 +585,7 @@ struct spi_dw_config spi_dw_config_0 = { DEVICE_INIT_CONFIG_DEFINE(spi_dw_port_0, CONFIG_SPI_DW_PORT_0_DRV_NAME, spi_dw_init, &spi_dw_config_0); -SYS_DEFINE_DEVICE(spi_dw_port_0, &spi_dw_data_port_0, SECONDARY, +DEVICE_DEFINE(spi_dw_port_0, &spi_dw_data_port_0, SECONDARY, CONFIG_SPI_DW_INIT_PRIORITY); void spi_config_0_irq(void) @@ -618,7 +618,7 @@ struct spi_dw_config spi_dw_config_1 = { DEVICE_INIT_CONFIG_DEFINE(spi_dw_port_1, CONFIG_SPI_DW_PORT_1_DRV_NAME, spi_dw_init, &spi_dw_config_1); -SYS_DEFINE_DEVICE(spi_dw_port_1, &spi_dw_data_port_1, SECONDARY, +DEVICE_DEFINE(spi_dw_port_1, &spi_dw_data_port_1, SECONDARY, CONFIG_SPI_DW_INIT_PRIORITY); void spi_config_1_irq(void) diff --git a/drivers/spi/spi_intel.c b/drivers/spi/spi_intel.c index 44aa3123578..132dd9970f3 100644 --- a/drivers/spi/spi_intel.c +++ b/drivers/spi/spi_intel.c @@ -471,7 +471,7 @@ DEVICE_INIT_CONFIG_DEFINE(spi_intel_port_0, CONFIG_SPI_INTEL_PORT_0_DRV_NAME, spi_intel_init, &spi_intel_config_0); /* SPI may use GPIO pin for CS, thus it needs to be initialized after GPIO */ -SYS_DEFINE_DEVICE(spi_intel_port_0, &spi_intel_data_port_0, SECONDARY, +DEVICE_DEFINE(spi_intel_port_0, &spi_intel_data_port_0, SECONDARY, CONFIG_SPI_INTEL_INIT_PRIORITY); void spi_config_0_irq(void) @@ -510,7 +510,7 @@ DEVICE_INIT_CONFIG_DEFINE(spi_intel_port_1, CONFIG_SPI_INTEL_PORT_1_DRV_NAME, spi_intel_init, &spi_intel_config_1); /* SPI may use GPIO pin for CS, thus it needs to be initialized after GPIO */ -SYS_DEFINE_DEVICE(spi_intel_port_1, &spi_intel_data_port_1, SECONDARY, +DEVICE_DEFINE(spi_intel_port_1, &spi_intel_data_port_1, SECONDARY, CONFIG_SPI_INTEL_INIT_PRIORITY); void spi_config_1_irq(void); diff --git a/drivers/timer/sys_clock_init.c b/drivers/timer/sys_clock_init.c index b9dab4168cc..ffb51f46ab8 100644 --- a/drivers/timer/sys_clock_init.c +++ b/drivers/timer/sys_clock_init.c @@ -35,5 +35,5 @@ DEVICE_INIT_CONFIG_DEFINE(sys_clock, "sys_clock", _sys_clock_driver_init, NULL); -SYS_DEFINE_DEVICE(sys_clock, NULL, NANOKERNEL, +DEVICE_DEFINE(sys_clock, NULL, NANOKERNEL, CONFIG_SYSTEM_CLOCK_INIT_PRIORITY); diff --git a/drivers/watchdog/wdt_dw.c b/drivers/watchdog/wdt_dw.c index 23571422f8a..35d30157a73 100644 --- a/drivers/watchdog/wdt_dw.c +++ b/drivers/watchdog/wdt_dw.c @@ -163,7 +163,7 @@ struct wdt_dw_dev_config wdt_dev = { DEVICE_INIT_CONFIG_DEFINE(wdt, CONFIG_WDT_DW_DRV_NAME, &wdt_dw_init, &wdt_dev); -SYS_DEFINE_DEVICE(wdt, &wdt_runtime, SECONDARY, +DEVICE_DEFINE(wdt, &wdt_runtime, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); int wdt_dw_init(struct device *dev) diff --git a/drivers/watchdog/wdt_qmsi.c b/drivers/watchdog/wdt_qmsi.c index 7e072a9e28c..1c94234dd85 100644 --- a/drivers/watchdog/wdt_qmsi.c +++ b/drivers/watchdog/wdt_qmsi.c @@ -100,7 +100,7 @@ static int init(struct device *dev) DEVICE_INIT_CONFIG_DEFINE(wdt, CONFIG_WDT_QMSI_DRV_NAME, init, 0); -SYS_DEFINE_DEVICE(wdt, 0, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); +DEVICE_DEFINE(wdt, 0, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); /* Define 'struct device' variable which is passed to the ISR. Even if it * is not used by the ISR code, we require it in order to be able to pass diff --git a/include/init.h b/include/init.h index e20ad42eff7..d5eafb18e28 100644 --- a/include/init.h +++ b/include/init.h @@ -39,7 +39,7 @@ extern "C" { #define _SYS_INIT_LEVEL_APPLICATION 4 -/** @def SYS_DEFINE_DEVICE +/** @def DEVICE_DEFINE * * @brief Define device object * @@ -83,7 +83,7 @@ extern "C" { * (e.g. CONFIG_KERNEL_INIT_PRIORITY_DEFAULT + 5). */ -#define SYS_DEFINE_DEVICE(name, data, level, priority) \ +#define DEVICE_DEFINE(name, data, level, priority) \ static struct device (__initconfig_##name) __used \ __attribute__((__section__(".init_" #level STRINGIFY(priority)))) = { \ .config = &(config_##name),\ @@ -95,14 +95,14 @@ extern "C" { * @brief Expands to the full name of a global device object * * @details Return the full name of a device object symbol created by - * SYS_DEFINE_DEVICE(), using the @name provided to SYS_DEFINE_DEVICE(). + * DEVICE_DEFINE(), using the @name provided to DEVICE_DEFINE(). * * It is meant to be used for declaring extern symbols pointing on device * objects before using the SYS_GET_DEVICE macro to get the device object. * - * @param name The same name provided to SYS_DEFINE_DEVICE() + * @param name The same name provided to DEVICE_DEFINE() * - * @return The exanded name of the device object created by SYS_DEFINE_DEVICE() + * @return The exanded name of the device object created by DEVICE_DEFINE() */ #define SYS_GET_DEVICE_NAME(name) (_CONCAT(__initconfig_, name)) @@ -112,11 +112,11 @@ extern "C" { * @brief Obtain a pointer to a device object by name * * @details Return the address of a device object created by - * SYS_DEFINE_DEVICE(), using the @name provided to SYS_DEFINE_DEVICE(). + * DEVICE_DEFINE(), using the @name provided to DEVICE_DEFINE(). * - * @param name The same name provided to SYS_DEFINE_DEVICE() + * @param name The same name provided to DEVICE_DEFINE() * - * @return A pointer to the device object created by SYS_DEFINE_DEVICE() + * @return A pointer to the device object created by DEVICE_DEFINE() */ #define SYS_GET_DEVICE(name) (&SYS_GET_DEVICE_NAME(name)) diff --git a/kernel/nanokernel/device.c b/kernel/nanokernel/device.c index 244a7e84011..fc3be13fc2a 100644 --- a/kernel/nanokernel/device.c +++ b/kernel/nanokernel/device.c @@ -23,7 +23,7 @@ static struct device *config_levels[] = { * @brief Execute all the device initialization functions at a given level * * @details Invokes the initialization routine for each device object - * created by the SYS_DEFINE_DEVICE() macro using the specified level. + * created by the DEVICE_DEFINE() macro using the specified level. * The linker script places the device objects in memory in the order * they need to be invoked, with symbols indicating where one level leaves * off and the next one begins. @@ -44,7 +44,7 @@ void _sys_device_do_config_level(int level) /** * @brief Retrieve the device structure for a driver by name * - * @details Device objects are created via the SYS_DEFINE_DEVICE() macro and + * @details Device objects are created via the DEVICE_DEFINE() macro and * placed in memory by the linker. If a driver needs to bind to another driver * it can use this function to retrieve the device structure of the lower level * driver by the name the driver exposes to the system. diff --git a/kernel/nanokernel/kernel_event_logger.c b/kernel/nanokernel/kernel_event_logger.c index 9fcd5f4111a..d54f7478125 100644 --- a/kernel/nanokernel/kernel_event_logger.c +++ b/kernel/nanokernel/kernel_event_logger.c @@ -55,7 +55,7 @@ static int _sys_k_event_logger_init(struct device *arg) } DEVICE_INIT_CONFIG_DEFINE(kernel_event_logger_0, "", _sys_k_event_logger_init, NULL); -SYS_DEFINE_DEVICE(kernel_event_logger_0, NULL, NANOKERNEL, +DEVICE_DEFINE(kernel_event_logger_0, NULL, NANOKERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); diff --git a/misc/debug/mem_safe_check_boundaries.c b/misc/debug/mem_safe_check_boundaries.c index ff557683b08..c5dce5f974a 100644 --- a/misc/debug/mem_safe_check_boundaries.c +++ b/misc/debug/mem_safe_check_boundaries.c @@ -291,5 +291,5 @@ static int init(struct device *unused) } DEVICE_INIT_CONFIG_DEFINE(mem_safe, "", init, NULL); -SYS_DEFINE_DEVICE(mem_safe, NULL, PRIMARY, +DEVICE_DEFINE(mem_safe, NULL, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); diff --git a/samples/nanokernel/test/test_ipm/src/test_ipm.c b/samples/nanokernel/test/test_ipm/src/test_ipm.c index ddbde1fbbba..4d338282606 100644 --- a/samples/nanokernel/test/test_ipm/src/test_ipm.c +++ b/samples/nanokernel/test/test_ipm/src/test_ipm.c @@ -41,7 +41,7 @@ /* Set up the dummy IPM driver */ struct ipm_dummy_driver_data ipm_dummy0_driver_data; DEVICE_INIT_CONFIG_DEFINE(ipm_dummy0, "ipm_dummy0", ipm_dummy_init, NULL); -SYS_DEFINE_DEVICE(ipm_dummy0, &ipm_dummy0_driver_data, SECONDARY, +DEVICE_DEFINE(ipm_dummy0, &ipm_dummy0_driver_data, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); /* Sending side of the console IPM driver, will forward anything sent @@ -53,7 +53,7 @@ struct ipm_console_sender_config_info sender_config = { }; DEVICE_INIT_CONFIG_DEFINE(ipm_console_send0, "ipm_send0", ipm_console_sender_init, &sender_config); -SYS_DEFINE_DEVICE(ipm_console_send0, NULL, NANOKERNEL, +DEVICE_DEFINE(ipm_console_send0, NULL, NANOKERNEL, INIT_PRIO_IPM_SEND); /* Receiving side of the console IPM driver. These numbers are @@ -80,7 +80,7 @@ struct ipm_console_receiver_config_info receiver_config = { struct ipm_console_receiver_runtime_data receiver_data; DEVICE_INIT_CONFIG_DEFINE(ipm_console_recv0, "ipm_recv0", ipm_console_receiver_init, &receiver_config); -SYS_DEFINE_DEVICE(ipm_console_recv0, &receiver_data, NANOKERNEL, +DEVICE_DEFINE(ipm_console_recv0, &receiver_data, NANOKERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); static const char thestr[] = "everything is awesome\n";