Skip to content

Commit b7c9c90

Browse files
author
Alain Volmat
committed
video: stm32: dcmipp: remove const for clock structs
Remove the const attribute of the struct stm32_pclken in the struct stm32_dcmipp_config since this leads to warnings due to losing the const pointer when calling the clock_control functions. Casts done when calling the clock_control_on functions were also wrong hence fix this. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
1 parent ba35846 commit b7c9c90

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/video/video_stm32_dcmipp.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@ struct stm32_dcmipp_data {
107107
};
108108

109109
struct stm32_dcmipp_config {
110-
const struct stm32_pclken dcmipp_pclken;
111-
const struct stm32_pclken dcmipp_pclken_ker;
110+
struct stm32_pclken dcmipp_pclken;
111+
struct stm32_pclken dcmipp_pclken_ker;
112112
irq_config_func_t irq_config;
113113
const struct pinctrl_dev_config *pctrl;
114114
const struct device *source_dev;
115115
const struct reset_dt_spec reset_dcmipp;
116116
int bus_type;
117117
#if defined(STM32_DCMIPP_HAS_CSI)
118-
const struct stm32_pclken csi_pclken;
118+
struct stm32_pclken csi_pclken;
119119
const struct reset_dt_spec reset_csi;
120120
struct {
121121
uint32_t nb_lanes;
@@ -1597,15 +1597,15 @@ static int stm32_dcmipp_enable_clock(const struct device *dev)
15971597
return err;
15981598
}
15991599

1600-
err = clock_control_on(cc_node, (clock_control_subsys_t *)&config->dcmipp_pclken);
1600+
err = clock_control_on(cc_node, (clock_control_subsys_t)&config->dcmipp_pclken);
16011601
if (err < 0) {
16021602
LOG_ERR("Failed to enable DCMIPP clock. Error %d", err);
16031603
return err;
16041604
}
16051605

16061606
#if defined(STM32_DCMIPP_HAS_CSI)
16071607
/* Turn on CSI peripheral clock */
1608-
err = clock_control_on(cc_node, (clock_control_subsys_t *)&config->csi_pclken);
1608+
err = clock_control_on(cc_node, (clock_control_subsys_t)&config->csi_pclken);
16091609
if (err < 0) {
16101610
LOG_ERR("Failed to enable CSI clock. Error %d", err);
16111611
return err;

0 commit comments

Comments
 (0)