Skip to content

Commit dc73e06

Browse files
drivers: Update p_context for all Renesas drivers
The p_context no longer has the const type, so all Renesas-supported drivers need to be updated accordingly. Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
1 parent f8e8be2 commit dc73e06

15 files changed

+15
-15
lines changed

drivers/can/can_renesas_ra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ DT_FOREACH_STATUS_OKAY(renesas_ra_canfd_global, CAN_RENESAS_RA_GLOBAL_DEFINE)
11491149
.tx_irq = DT_INST_IRQ_BY_NAME(index, tx, irq), \
11501150
.p_extend = &can_renesas_ra_data##index.fsp_canfd_extend, \
11511151
.p_bit_timing = &can_renesas_ra_data##index.bit_timing, \
1152-
.p_context = DEVICE_DT_INST_GET(index), \
1152+
.p_context = (void *)DEVICE_DT_INST_GET(index), \
11531153
.p_callback = can_renesas_ra_fsp_cb, \
11541154
}, \
11551155
.fsp_canfd_extend = \

drivers/comparator/comparator_renesas_ra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ static int acmphs_renesas_ra_init(const struct device *dev)
164164
return ret;
165165
}
166166

167-
data->fsp_config.p_context = dev;
167+
data->fsp_config.p_context = (void *)dev;
168168

169169
fsp_err = R_ACMPHS_Open(&data->acmphs, &data->fsp_config);
170170
if (FSP_SUCCESS != fsp_err) {

drivers/display/display_renesas_ra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ static int display_init(const struct device *dev)
491491
.contrast = {.enable = false}, \
492492
.dithering_on = false}, \
493493
.p_callback = renesas_ra_callback_adapter, \
494-
.p_context = DEVICE_DT_INST_GET(id), \
494+
.p_context = (void *)DEVICE_DT_INST_GET(id), \
495495
.p_extend = (void *)(&display_extend_cfg##id), \
496496
.line_detect_irq = DT_INST_IRQ_BY_NAME(id, line, irq), \
497497
.line_detect_ipl = DT_INST_IRQ_BY_NAME(id, line, priority), \

drivers/i2c/i2c_renesas_ra_iic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ static DEVICE_API(i2c, i2c_ra_iic_driver_api) = {
540540
.tei_irq = DT_INST_IRQ_BY_NAME(index, tei, irq), \
541541
.eri_irq = DT_INST_IRQ_BY_NAME(index, eri, irq), \
542542
.p_callback = i2c_ra_iic_callback, \
543-
.p_context = DEVICE_DT_GET(DT_DRV_INST(index)), \
543+
.p_context = (void *)DEVICE_DT_GET(DT_DRV_INST(index)), \
544544
}, \
545545
}; \
546546
\

drivers/i2c/i2c_renesas_ra_sci_b.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ static const struct i2c_driver_api renesas_ra_sci_b_i2c_driver_api = {
710710
.txi_irq = DT_IRQ_BY_NAME(DT_INST_PARENT(index), txi, irq), \
711711
.tei_irq = DT_IRQ_BY_NAME(DT_INST_PARENT(index), tei, irq), \
712712
.p_callback = renesas_ra_sci_b_i2c_callback, \
713-
.p_context = DEVICE_DT_GET(DT_DRV_INST(index)), \
713+
.p_context = (void *)DEVICE_DT_GET(DT_DRV_INST(index)), \
714714
}, \
715715
.ext_cfg = \
716716
{ \

drivers/i2s/i2s_renesas_ra_ssie.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ static DEVICE_API(i2s, i2s_renesas_ra_drv_api) = {
11551155
.word_length = I2S_WORD_LENGTH_16_BITS, \
11561156
.ws_continue = I2S_WS_CONTINUE_OFF, \
11571157
.p_callback = renesas_ra_ssie_callback, \
1158-
.p_context = DEVICE_DT_INST_GET(index), \
1158+
.p_context = (void *)DEVICE_DT_INST_GET(index), \
11591159
.p_extend = &ssi_extended_cfg_t_##index, \
11601160
.txi_irq = RA_SSIE_TX_IRQ_BY_NAME(index, irq), \
11611161
.rxi_irq = RA_SSIE_RX_IRQ_BY_NAME(index, irq), \

drivers/i3c/i3c_renesas_ra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ static DEVICE_API(i3c, i3c_renesas_ra_api) = {
11871187
static i3c_cfg_t i3c##index##_cfg = { \
11881188
.channel = DT_INST_PROP(index, channel), \
11891189
.p_callback = &i3c_renesas_ra_hal_callback, \
1190-
.p_context = DEVICE_DT_INST_GET(index), \
1190+
.p_context = (void *)DEVICE_DT_INST_GET(index), \
11911191
.p_extend = &i3c##index##_cfg_extend, \
11921192
}; \
11931193
static i3c_device_cfg_t i3c##index##_master_cfg = {0}; \

drivers/mipi_dsi/dsi_renesas_ra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ static int mipi_dsi_renesas_ra_init(const struct device *dev)
374374
.eotp_enable = (1), \
375375
.p_extend = &mipi_dsi_##id##_extended_cfg, \
376376
.p_callback = mipi_dsi_callback, \
377-
.p_context = DEVICE_DT_INST_GET(id), \
377+
.p_context = (void *)DEVICE_DT_INST_GET(id), \
378378
}, \
379379
}; \
380380
\

drivers/pwm/pwm_renesas_ra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ static int pwm_renesas_ra_init(const struct device *dev)
493493

494494
#if defined(CONFIG_PWM_CAPTURE)
495495
data->fsp_cfg.p_callback = fsp_callback;
496-
data->fsp_cfg.p_context = dev;
496+
data->fsp_cfg.p_context = (void *)dev;
497497
#endif /* defined(CONFIG_PWM_CAPTURE) */
498498

499499
#ifdef CONFIG_RENESAS_RA_ELC

drivers/serial/uart_renesas_ra8_sci_b.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ static int uart_ra_sci_b_init(const struct device *dev)
10421042

10431043
#if defined(CONFIG_UART_ASYNC_API)
10441044
data->fsp_config.p_callback = uart_ra_sci_b_callback_adapter;
1045-
data->fsp_config.p_context = dev;
1045+
data->fsp_config.p_context = (void *)dev;
10461046

10471047
k_work_init_delayable(&data->tx_timeout_work, uart_ra_sci_b_async_tx_timeout);
10481048
k_work_init_delayable(&data->rx_timeout_work, uart_ra_sci_b_async_rx_timeout);

0 commit comments

Comments
 (0)