Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/mbox/mbox_stm32_hsem.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static int mbox_stm32_clock_init(const struct device *dev)
return -ENODEV;
}

if (clock_control_on(clk, (clock_control_subsys_t *)&cfg->pclken) != 0) {
if (clock_control_on(clk, (clock_control_subsys_t)&cfg->pclken) != 0) {
LOG_WRN("Failed to enable clock.");
return -EIO;
}
Expand Down
13 changes: 5 additions & 8 deletions drivers/usb/udc/udc_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ static void priv_pcd_prepare(const struct device *dev)
priv->pcd.Init.phy_itface = cfg->selected_phy;
}

static const struct stm32_pclken pclken[] = STM32_DT_INST_CLOCKS(0);
static struct stm32_pclken pclken[] = STM32_DT_INST_CLOCKS(0);

static int priv_clock_enable(void)
{
Expand Down Expand Up @@ -1182,24 +1182,21 @@ static int priv_clock_enable(void)
#endif

if (DT_INST_NUM_CLOCKS(0) > 1) {
if (clock_control_configure(clk, (clock_control_subsys_t *)&pclken[1],
NULL) != 0) {
if (clock_control_configure(clk, &pclken[1], NULL) != 0) {
LOG_ERR("Could not select USB domain clock");
return -EIO;
}
}

if (clock_control_on(clk, (clock_control_subsys_t *)&pclken[0]) != 0) {
if (clock_control_on(clk, &pclken[0]) != 0) {
LOG_ERR("Unable to enable USB clock");
return -EIO;
}

if (IS_ENABLED(CONFIG_UDC_STM32_CLOCK_CHECK)) {
uint32_t usb_clock_rate;

if (clock_control_get_rate(clk,
(clock_control_subsys_t *)&pclken[1],
&usb_clock_rate) != 0) {
if (clock_control_get_rate(clk, &pclken[1], &usb_clock_rate) != 0) {
LOG_ERR("Failed to get USB domain clock rate");
return -EIO;
}
Expand Down Expand Up @@ -1292,7 +1289,7 @@ static int priv_clock_disable(void)
{
const struct device *clk = DEVICE_DT_GET(STM32_CLOCK_CONTROL_NODE);

if (clock_control_off(clk, (clock_control_subsys_t *)&pclken[0]) != 0) {
if (clock_control_off(clk, &pclken[0]) != 0) {
LOG_ERR("Unable to disable USB clock");
return -EIO;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/video_stm32_dcmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ static int stm32_dcmi_enable_clock(const struct device *dev)
}

/* Turn on DCMI peripheral clock */
return clock_control_on(dcmi_clock, (clock_control_subsys_t *)&config->pclken);
return clock_control_on(dcmi_clock, (clock_control_subsys_t)&config->pclken);
}

static int video_stm32_dcmi_set_fmt(const struct device *dev, struct video_format *fmt)
Expand Down
4 changes: 2 additions & 2 deletions drivers/video/video_stm32_dcmipp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1597,15 +1597,15 @@ static int stm32_dcmipp_enable_clock(const struct device *dev)
return err;
}

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

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