devicetree: Change DT_FOREACH_IMPL_ to not insert semicolon
Remove semicolon between instance invocations of DT_FOREACH_IMPL_ and thus DT_INST_FOREACH. This provides more flexibility to the user. This requires we fixup in tree users to add semicolon where needed. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
06d4c6d8b3
commit
0a7d4e2135
50 changed files with 52 additions and 52 deletions
|
@ -294,6 +294,6 @@ static const struct adc_driver_api adc_nrfx_driver_api = {
|
|||
init_adc, NULL, NULL, \
|
||||
POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&adc_nrfx_driver_api)
|
||||
&adc_nrfx_driver_api);
|
||||
|
||||
DT_INST_FOREACH(ADC_INIT)
|
||||
|
|
|
@ -437,6 +437,6 @@ static const struct adc_driver_api adc_nrfx_driver_api = {
|
|||
NULL, \
|
||||
POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&adc_nrfx_driver_api)
|
||||
&adc_nrfx_driver_api);
|
||||
|
||||
DT_INST_FOREACH(SAADC_INIT)
|
||||
|
|
|
@ -77,6 +77,6 @@ static const struct clock_control_driver_api mcux_pcc_api = {
|
|||
NULL, &mcux_pcc##inst##_config, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_OBJECTS, \
|
||||
&mcux_pcc_api)
|
||||
&mcux_pcc_api);
|
||||
|
||||
DT_INST_FOREACH(MCUX_PCC_INIT)
|
||||
|
|
|
@ -70,6 +70,6 @@ static const struct clock_control_driver_api rv32m1_pcc_api = {
|
|||
NULL, &rv32m1_pcc##inst##_config, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_OBJECTS, \
|
||||
&rv32m1_pcc_api)
|
||||
&rv32m1_pcc_api);
|
||||
|
||||
DT_INST_FOREACH(RV32M1_PCC_INIT)
|
||||
|
|
|
@ -108,6 +108,6 @@ static const struct dac_driver_api mcux_dac_driver_api = {
|
|||
mcux_dac_init, &mcux_dac_data_##n, \
|
||||
&mcux_dac_config_##n, \
|
||||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,\
|
||||
&mcux_dac_driver_api)
|
||||
&mcux_dac_driver_api);
|
||||
|
||||
DT_INST_FOREACH(MCUX_DAC_INIT)
|
||||
|
|
|
@ -111,6 +111,6 @@ static const struct dac_driver_api mcux_dac32_driver_api = {
|
|||
mcux_dac32_init, &mcux_dac32_data_##n, \
|
||||
&mcux_dac32_config_##n, \
|
||||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,\
|
||||
&mcux_dac32_driver_api)
|
||||
&mcux_dac32_driver_api);
|
||||
|
||||
DT_INST_FOREACH(MCUX_DAC32_INIT)
|
||||
|
|
|
@ -310,6 +310,6 @@ static const struct gpio_driver_api api_funcs = {
|
|||
\
|
||||
GPIO_CC32XX_INIT_FUNC(n) \
|
||||
\
|
||||
GPIO_CC32XX_DEVICE_INIT(n)
|
||||
GPIO_CC32XX_DEVICE_INIT(n);
|
||||
|
||||
DT_INST_FOREACH(GPIO_CC32XX_INIT)
|
||||
|
|
|
@ -215,6 +215,6 @@ static const struct gpio_driver_api gpio_ht16k33_api = {
|
|||
&gpio_ht16k33_##id##_data, \
|
||||
&gpio_ht16k33_##id##_cfg, POST_KERNEL, \
|
||||
CONFIG_GPIO_HT16K33_INIT_PRIORITY, \
|
||||
&gpio_ht16k33_api)
|
||||
&gpio_ht16k33_api);
|
||||
|
||||
DT_INST_FOREACH(GPIO_HT16K33_DEVICE)
|
||||
|
|
|
@ -599,7 +599,7 @@ DEVICE_AND_API_INIT(gpio_intel_apl_##n, \
|
|||
&gpio_intel_apl_data_##n, \
|
||||
&gpio_intel_apl_cfg_##n, \
|
||||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&gpio_intel_apl_api)
|
||||
&gpio_intel_apl_api);
|
||||
|
||||
/* "sub" devices. no more than GPIO_INTEL_APL_NR_SUBDEVS of these! */
|
||||
DT_INST_FOREACH(GPIO_INTEL_APL_DEV_CFG_DATA)
|
||||
|
|
|
@ -237,6 +237,6 @@ static const struct gpio_driver_api gpio_litex_driver_api = {
|
|||
POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&gpio_litex_driver_api \
|
||||
)
|
||||
);
|
||||
|
||||
DT_INST_FOREACH(GPIO_LITEX_INIT)
|
||||
|
|
|
@ -183,6 +183,6 @@ BUILD_ASSERT(CONFIG_GPIO_LMP90XXX_INIT_PRIORITY >
|
|||
&gpio_lmp90xxx_##id##_data, \
|
||||
&gpio_lmp90xxx_##id##_cfg, POST_KERNEL, \
|
||||
CONFIG_GPIO_LMP90XXX_INIT_PRIORITY, \
|
||||
&gpio_lmp90xxx_api)
|
||||
&gpio_lmp90xxx_api);
|
||||
|
||||
DT_INST_FOREACH(GPIO_LMP90XXX_DEVICE)
|
||||
|
|
|
@ -438,6 +438,6 @@ static int mcp23s17_init(struct device *dev)
|
|||
&mcp23s17_##inst##_config, \
|
||||
POST_KERNEL, \
|
||||
CONFIG_GPIO_MCP23S17_INIT_PRIORITY, \
|
||||
&api_table)
|
||||
&api_table);
|
||||
|
||||
DT_INST_FOREACH(MCP23S17_INIT)
|
||||
|
|
|
@ -174,6 +174,6 @@ DEVICE_AND_API_INIT(i2c_gpio_##_num, DT_INST_LABEL(_num), \
|
|||
i2c_gpio_init, \
|
||||
&i2c_gpio_dev_data_##_num, \
|
||||
&i2c_gpio_dev_cfg_##_num, \
|
||||
PRE_KERNEL_2, CONFIG_I2C_INIT_PRIORITY, &api)
|
||||
PRE_KERNEL_2, CONFIG_I2C_INIT_PRIORITY, &api);
|
||||
|
||||
DT_INST_FOREACH(DEFINE_I2C_GPIO)
|
||||
|
|
|
@ -134,6 +134,6 @@ static const struct i2c_driver_api i2c_litex_driver_api = {
|
|||
POST_KERNEL, \
|
||||
CONFIG_I2C_INIT_PRIORITY, \
|
||||
&i2c_litex_driver_api \
|
||||
)
|
||||
);
|
||||
|
||||
DT_INST_FOREACH(I2C_LITEX_INIT)
|
||||
|
|
|
@ -367,6 +367,6 @@ static const struct i2c_driver_api i2c_sam_twi_driver_api = {
|
|||
&i2c_sam_twi_initialize, \
|
||||
&i2c##n##_sam_data, &i2c##n##_sam_config, \
|
||||
POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, \
|
||||
&i2c_sam_twi_driver_api)
|
||||
&i2c_sam_twi_driver_api);
|
||||
|
||||
DT_INST_FOREACH(I2C_TWI_SAM_INIT)
|
||||
|
|
|
@ -354,6 +354,6 @@ static const struct i2c_driver_api i2c_sam_twihs_driver_api = {
|
|||
&i2c_sam_twihs_initialize, \
|
||||
&i2c##n##_sam_data, &i2c##n##_sam_config, \
|
||||
POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, \
|
||||
&i2c_sam_twihs_driver_api)
|
||||
&i2c_sam_twihs_driver_api);
|
||||
|
||||
DT_INST_FOREACH(I2C_TWIHS_SAM_INIT)
|
||||
|
|
|
@ -120,6 +120,6 @@ DEVICE_AND_API_INIT(i2c_sbcon_##_num, DT_INST_LABEL(_num), \
|
|||
i2c_sbcon_init, \
|
||||
&i2c_sbcon_dev_data_##_num, \
|
||||
&i2c_sbcon_dev_cfg_##_num, \
|
||||
PRE_KERNEL_2, CONFIG_I2C_INIT_PRIORITY, &api)
|
||||
PRE_KERNEL_2, CONFIG_I2C_INIT_PRIORITY, &api);
|
||||
|
||||
DT_INST_FOREACH(DEFINE_I2C_SBCON)
|
||||
|
|
|
@ -345,6 +345,6 @@ static struct i2c_driver_api i2c_sifive_api = {
|
|||
&i2c_sifive_cfg_##n, \
|
||||
POST_KERNEL, \
|
||||
CONFIG_I2C_INIT_PRIORITY, \
|
||||
&i2c_sifive_api)
|
||||
&i2c_sifive_api);
|
||||
|
||||
DT_INST_FOREACH(I2C_SIFIVE_INIT)
|
||||
|
|
|
@ -227,6 +227,6 @@ static int i2c_eeprom_slave_init(struct device *dev)
|
|||
&i2c_eeprom_slave_##inst##_cfg, \
|
||||
POST_KERNEL, \
|
||||
CONFIG_I2C_SLAVE_INIT_PRIORITY, \
|
||||
&api_funcs)
|
||||
&api_funcs);
|
||||
|
||||
DT_INST_FOREACH(I2C_EEPROM_INIT)
|
||||
|
|
|
@ -238,6 +238,6 @@ static const struct led_strip_driver_api ws2812_gpio_api = {
|
|||
&ws2812_gpio_##idx##_data, \
|
||||
&ws2812_gpio_##idx##_cfg, POST_KERNEL, \
|
||||
CONFIG_LED_STRIP_INIT_PRIORITY, \
|
||||
&ws2812_gpio_api)
|
||||
&ws2812_gpio_api);
|
||||
|
||||
DT_INST_FOREACH(WS2812_GPIO_DEVICE)
|
||||
|
|
|
@ -76,6 +76,6 @@ static const struct pinmux_driver_api pinmux_rv32m1_driver_api = {
|
|||
NULL, &pinmux_rv32m1_##n##_config, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \
|
||||
&pinmux_rv32m1_driver_api)
|
||||
&pinmux_rv32m1_driver_api);
|
||||
|
||||
DT_INST_FOREACH(PINMUX_RV32M1_INIT)
|
||||
|
|
|
@ -170,7 +170,7 @@ static const struct pwm_driver_api imx_pwm_driver_api = {
|
|||
&imx_pwm_init, &imx_pwm_data_##n, \
|
||||
&imx_pwm_config_##n, POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&imx_pwm_driver_api)
|
||||
&imx_pwm_driver_api);
|
||||
|
||||
#if DT_HAS_COMPAT(fsl_imx7d_pwm)
|
||||
#define DT_DRV_COMPAT fsl_imx7d_pwm
|
||||
|
|
|
@ -111,6 +111,6 @@ static const struct pwm_driver_api pwm_litex_driver_api = {
|
|||
POST_KERNEL, \
|
||||
CONFIG_PWM_LITEX_INIT_PRIORITY, \
|
||||
&pwm_litex_driver_api \
|
||||
)
|
||||
);
|
||||
|
||||
DT_INST_FOREACH(PWM_LITEX_INIT)
|
||||
|
|
|
@ -394,6 +394,6 @@ static struct pwm_driver_api pwm_xec_api = {
|
|||
&pwm_xec_dev_config_##inst, \
|
||||
POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&pwm_xec_api)
|
||||
&pwm_xec_api);
|
||||
|
||||
DT_INST_FOREACH(XEC_INST_INIT)
|
||||
|
|
|
@ -170,6 +170,6 @@ static const struct pwm_driver_api mcux_ftm_driver_api = {
|
|||
&mcux_ftm_init, &mcux_ftm_data_##n, \
|
||||
&mcux_ftm_config_##n, \
|
||||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&mcux_ftm_driver_api)
|
||||
&mcux_ftm_driver_api);
|
||||
|
||||
DT_INST_FOREACH(FTM_DEVICE);
|
||||
|
|
|
@ -199,6 +199,6 @@ static const struct pwm_driver_api mcux_tpm_driver_api = {
|
|||
&mcux_tpm_init, &mcux_tpm_data_##n, \
|
||||
&mcux_tpm_config_##n, \
|
||||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&mcux_tpm_driver_api)
|
||||
&mcux_tpm_driver_api);
|
||||
|
||||
DT_INST_FOREACH(TPM_DEVICE)
|
||||
|
|
|
@ -198,6 +198,6 @@ static const struct pwm_driver_api rv32m1_tpm_driver_api = {
|
|||
&rv32m1_tpm_init, &rv32m1_tpm_data_##n, \
|
||||
&rv32m1_tpm_config_##n, \
|
||||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&rv32m1_tpm_driver_api)
|
||||
&rv32m1_tpm_driver_api);
|
||||
|
||||
DT_INST_FOREACH(TPM_DEVICE)
|
||||
|
|
|
@ -111,6 +111,6 @@ static const struct pwm_driver_api sam_pwm_driver_api = {
|
|||
NULL, &sam_pwm_config_##inst, \
|
||||
POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&sam_pwm_driver_api)
|
||||
&sam_pwm_driver_api);
|
||||
|
||||
DT_INST_FOREACH(SAM_INST_INIT)
|
||||
|
|
|
@ -244,6 +244,6 @@ static const struct pwm_driver_api pwm_sifive_api = {
|
|||
&pwm_sifive_cfg_##n, \
|
||||
POST_KERNEL, \
|
||||
CONFIG_PWM_SIFIVE_INIT_PRIORITY, \
|
||||
&pwm_sifive_api)
|
||||
&pwm_sifive_api);
|
||||
|
||||
DT_INST_FOREACH(PWM_SIFIVE_INIT)
|
||||
|
|
|
@ -273,6 +273,6 @@ static int pwm_stm32_init(struct device *dev)
|
|||
&pwm_stm32_dev_data_##index, \
|
||||
&pwm_stm32_dev_cfg_##index, \
|
||||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,\
|
||||
&pwm_stm32_drv_api_funcs)
|
||||
&pwm_stm32_drv_api_funcs);
|
||||
|
||||
DT_INST_FOREACH(PWM_DEVICE_INIT_STM32)
|
||||
|
|
|
@ -628,6 +628,6 @@ static const struct sensor_driver_api bq274xx_battery_driver_api = {
|
|||
&bq274xx_gauge_init, &bq274xx_driver_##index, \
|
||||
&bq274xx_config_##index, POST_KERNEL, \
|
||||
CONFIG_SENSOR_INIT_PRIORITY, \
|
||||
&bq274xx_battery_driver_api) \
|
||||
&bq274xx_battery_driver_api);
|
||||
|
||||
DT_INST_FOREACH(BQ274XX_INIT)
|
||||
|
|
|
@ -131,6 +131,6 @@ static const struct sensor_driver_api tach_xec_driver_api = {
|
|||
&tach_xec_dev_config##id, \
|
||||
POST_KERNEL, \
|
||||
CONFIG_SENSOR_INIT_PRIORITY, \
|
||||
&tach_xec_driver_api) \
|
||||
&tach_xec_driver_api);
|
||||
|
||||
DT_INST_FOREACH(TACH_XEC_DEVICE)
|
||||
|
|
|
@ -655,6 +655,6 @@ static const struct uart_driver_api uart_cc13xx_cc26xx_driver_api = {
|
|||
UART_CC13XX_CC26XX_INT_FIELDS \
|
||||
}; \
|
||||
\
|
||||
UART_CC13XX_CC26XX_DEVICE_INIT(n)
|
||||
UART_CC13XX_CC26XX_DEVICE_INIT(n);
|
||||
|
||||
DT_INST_FOREACH(UART_CC13XX_CC26XX_INIT)
|
||||
|
|
|
@ -324,6 +324,6 @@ static const struct uart_driver_api uart_imx_driver_api = {
|
|||
\
|
||||
UART_IMX_CONFIG_FUNC(n) \
|
||||
\
|
||||
UART_IMX_INIT_CFG(n)
|
||||
UART_IMX_INIT_CFG(n);
|
||||
|
||||
DT_INST_FOREACH(UART_IMX_INIT)
|
||||
|
|
|
@ -338,6 +338,6 @@ static const struct uart_mcux_config uart_mcux_##n##_config = { \
|
|||
\
|
||||
UART_MCUX_CONFIG_FUNC(n) \
|
||||
\
|
||||
UART_MCUX_INIT_CFG(n)
|
||||
UART_MCUX_INIT_CFG(n);
|
||||
|
||||
DT_INST_FOREACH(UART_MCUX_INIT)
|
||||
|
|
|
@ -333,6 +333,6 @@ static const struct mcux_flexcomm_config mcux_flexcomm_##n##_config = { \
|
|||
\
|
||||
UART_MCUX_FLEXCOMM_CONFIG_FUNC(n) \
|
||||
\
|
||||
UART_MCUX_FLEXCOMM_INIT_CFG(n)
|
||||
UART_MCUX_FLEXCOMM_INIT_CFG(n);
|
||||
|
||||
DT_INST_FOREACH(UART_MCUX_FLEXCOMM_INIT)
|
||||
|
|
|
@ -330,6 +330,6 @@ static const struct mcux_lpsci_config mcux_lpsci_##n##_config = { \
|
|||
\
|
||||
MCUX_LPSCI_CONFIG_FUNC(n) \
|
||||
\
|
||||
MCUX_LPSCI_INIT_CFG(n)
|
||||
MCUX_LPSCI_INIT_CFG(n);
|
||||
|
||||
DT_INST_FOREACH(MCUX_LPSCI_INIT)
|
||||
|
|
|
@ -338,6 +338,6 @@ static const struct mcux_lpuart_config mcux_lpuart_##n##_config = { \
|
|||
\
|
||||
LPUART_MCUX_CONFIG_FUNC(n) \
|
||||
\
|
||||
LPUART_MCUX_INIT_CFG(n)
|
||||
LPUART_MCUX_INIT_CFG(n);
|
||||
|
||||
DT_INST_FOREACH(LPUART_MCUX_INIT)
|
||||
|
|
|
@ -344,6 +344,6 @@ static const struct uart_driver_api rv32m1_lpuart_driver_api = {
|
|||
\
|
||||
RV32M1_LPUART_CONFIG_FUNC(n) \
|
||||
\
|
||||
RV32M1_LPUART_INIT_CFG(n)
|
||||
RV32M1_LPUART_INIT_CFG(n);
|
||||
|
||||
DT_INST_FOREACH(RV32M1_LPUART_INIT)
|
||||
|
|
|
@ -369,6 +369,6 @@ static const struct uart_driver_api uart_sam_driver_api = {
|
|||
\
|
||||
UART_SAM_CONFIG_FUNC(n) \
|
||||
\
|
||||
UART_SAM_INIT_CFG(n)
|
||||
UART_SAM_INIT_CFG(n);
|
||||
|
||||
DT_INST_FOREACH(UART_SAM_INIT)
|
||||
|
|
|
@ -1217,6 +1217,6 @@ DEVICE_AND_API_INIT(uart_xlnx_ps_##port, DT_INST_LABEL(port), \
|
|||
UART_XLNX_PS_IRQ_CONF_FUNC(inst); \
|
||||
UART_XLNX_PS_DEV_DATA(inst); \
|
||||
UART_XLNX_PS_DEV_CFG(inst); \
|
||||
UART_XLNX_PS_INIT(inst)
|
||||
UART_XLNX_PS_INIT(inst);
|
||||
|
||||
DT_INST_FOREACH(UART_XLNX_INSTANTIATE)
|
||||
|
|
|
@ -370,6 +370,6 @@ static const struct uart_driver_api usart_sam_driver_api = {
|
|||
\
|
||||
USART_SAM_CONFIG_FUNC(n) \
|
||||
\
|
||||
USART_SAM_INIT_CFG(n)
|
||||
USART_SAM_INIT_CFG(n);
|
||||
|
||||
DT_INST_FOREACH(USART_SAM_INIT)
|
||||
|
|
|
@ -370,6 +370,6 @@ static const struct spi_driver_api spi_cc13xx_cc26xx_driver_api = {
|
|||
SPI_CONTEXT_INIT_SYNC(spi_cc13xx_cc26xx_data_##n, ctx), \
|
||||
}; \
|
||||
\
|
||||
SPI_CC13XX_CC26XX_DEVICE_INIT(n)
|
||||
SPI_CC13XX_CC26XX_DEVICE_INIT(n);
|
||||
|
||||
DT_INST_FOREACH(SPI_CC13XX_CC26XX_INIT)
|
||||
|
|
|
@ -315,7 +315,7 @@ static struct spi_driver_api spi_gecko_api = {
|
|||
&spi_gecko_cfg_##n, \
|
||||
POST_KERNEL, \
|
||||
CONFIG_SPI_INIT_PRIORITY, \
|
||||
&spi_gecko_api)
|
||||
&spi_gecko_api);
|
||||
|
||||
#define SPI_ID(n) DT_INST_PROP(n, peripheral_id)
|
||||
|
||||
|
|
|
@ -180,6 +180,6 @@ static struct spi_driver_api spi_litespi_api = {
|
|||
&spi_litespi_cfg_##n, \
|
||||
POST_KERNEL, \
|
||||
CONFIG_SPI_INIT_PRIORITY, \
|
||||
&spi_litespi_api)
|
||||
&spi_litespi_api);
|
||||
|
||||
DT_INST_FOREACH(SPI_INIT)
|
||||
|
|
|
@ -220,6 +220,6 @@ int spi_oc_simple_init(struct device *dev)
|
|||
&spi_oc_simple_cfg_##inst, \
|
||||
POST_KERNEL, \
|
||||
CONFIG_SPI_INIT_PRIORITY, \
|
||||
&spi_oc_simple_api)
|
||||
&spi_oc_simple_api);
|
||||
|
||||
DT_INST_FOREACH(SPI_OC_INIT)
|
||||
|
|
|
@ -471,6 +471,6 @@ static const struct spi_driver_api spi_sam_driver_api = {
|
|||
DT_INST_LABEL(n), \
|
||||
&spi_sam_init, &spi_sam_dev_data_##n, \
|
||||
&spi_sam_config_##n, POST_KERNEL, \
|
||||
CONFIG_SPI_INIT_PRIORITY, &spi_sam_driver_api)
|
||||
CONFIG_SPI_INIT_PRIORITY, &spi_sam_driver_api);
|
||||
|
||||
DT_INST_FOREACH(SPI_SAM_DEVICE_INIT)
|
||||
|
|
|
@ -768,6 +768,6 @@ static const struct spi_sam0_config spi_sam0_config_##n = { \
|
|||
&spi_sam0_init, &spi_sam0_dev_data_##n, \
|
||||
&spi_sam0_config_##n, POST_KERNEL, \
|
||||
CONFIG_SPI_INIT_PRIORITY, \
|
||||
&spi_sam0_driver_api)
|
||||
&spi_sam0_driver_api);
|
||||
|
||||
DT_INST_FOREACH(SPI_SAM0_DEVICE_INIT)
|
||||
|
|
|
@ -556,7 +556,7 @@ def write_global_compat_info(edt):
|
|||
"\n")
|
||||
for numinsts in range(1, max(compat2numinst.values(), default=0) + 1):
|
||||
out_define(f"DT_FOREACH_IMPL_{numinsts}(fn)",
|
||||
" ".join([f"fn({i});" for i in range(numinsts)]))
|
||||
" ".join([f"fn({i})" for i in range(numinsts)]))
|
||||
|
||||
out_comment("Macros for enabled instances of each compatible\n")
|
||||
n_inst_macros = {}
|
||||
|
|
|
@ -1179,9 +1179,9 @@ static const struct gpio_driver_api test_api;
|
|||
&gpio_info_##num, \
|
||||
POST_KERNEL, \
|
||||
CONFIG_APPLICATION_INIT_PRIORITY, \
|
||||
&test_api)
|
||||
&test_api);
|
||||
|
||||
DT_INST_FOREACH(TEST_GPIO_INIT);
|
||||
DT_INST_FOREACH(TEST_GPIO_INIT)
|
||||
|
||||
static inline struct test_gpio_data *to_data(struct device *dev)
|
||||
{
|
||||
|
@ -1227,7 +1227,7 @@ static void test_devices(void)
|
|||
* using macros with side effects in the current scope.
|
||||
*/
|
||||
#undef SET_BIT
|
||||
#define SET_BIT(i) do { unsigned int bit = BIT(i); val |= bit; } while (0)
|
||||
#define SET_BIT(i) do { unsigned int bit = BIT(i); val |= bit; } while (0);
|
||||
val = 0;
|
||||
DT_INST_FOREACH(SET_BIT);
|
||||
zassert_equal(val, 0x3, "foreach vnd_gpio");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue