diff --git a/tests/drivers/dma/loop_transfer/src/test_dma_loop.c b/tests/drivers/dma/loop_transfer/src/test_dma_loop.c index 6aed3d424fc..9faf3a551e1 100644 --- a/tests/drivers/dma/loop_transfer/src/test_dma_loop.c +++ b/tests/drivers/dma/loop_transfer/src/test_dma_loop.c @@ -79,7 +79,7 @@ static void dma_user_callback(const struct device *dma_dev, void *arg, * the device is the DMAMUX, given through * the stream->user_data by the dma_stm32_irq_handler */ - test_transfer((struct device *)arg, id); + test_transfer((const struct device *)arg, id); #else test_transfer(dma_dev, id); #endif /* CONFIG_DMAMUX_STM32 */ @@ -113,7 +113,7 @@ static int test_loop(void) dma_cfg.source_burst_length = 1U; dma_cfg.dest_burst_length = 1U; #ifdef CONFIG_DMAMUX_STM32 - dma_cfg.user_data = (struct device *)dma; + dma_cfg.user_data = (void *)dma; #else dma_cfg.user_data = NULL; #endif /* CONFIG_DMAMUX_STM32 */ diff --git a/tests/subsys/pm/device_wakeup_api/src/main.c b/tests/subsys/pm/device_wakeup_api/src/main.c index 2285f276a46..963c9fa0d22 100644 --- a/tests/subsys/pm/device_wakeup_api/src/main.c +++ b/tests/subsys/pm/device_wakeup_api/src/main.c @@ -36,7 +36,8 @@ void pm_state_set(enum pm_state state, uint8_t substate_id) /* Enable wakeup source. Next time the system is called * to sleep, this device will still be active. */ - (void)pm_device_wakeup_enable((struct device *)dev, true); + (void)pm_device_wakeup_enable((const struct device *)dev, + true); break; case 2: zassert_equal(state, PM_STATE_SUSPEND_TO_RAM, "Wrong system state"); @@ -86,13 +87,13 @@ void test_wakeup_device_api(void) ret = pm_device_wakeup_is_capable(dev); zassert_true(ret, "Device marked as capable"); - ret = pm_device_wakeup_enable((struct device *)dev, true); + ret = pm_device_wakeup_enable((const struct device *)dev, true); zassert_true(ret, "Could not enable wakeup source"); ret = pm_device_wakeup_is_enabled(dev); zassert_true(ret, "Wakeup source not enabled"); - ret = pm_device_wakeup_enable((struct device *)dev, false); + ret = pm_device_wakeup_enable((const struct device *)dev, false); zassert_true(ret, "Could not disable wakeup source"); ret = pm_device_wakeup_is_enabled(dev); diff --git a/tests/subsys/pm/power_mgmt/src/main.c b/tests/subsys/pm/power_mgmt/src/main.c index 6daf449f53b..381456c0bd0 100644 --- a/tests/subsys/pm/power_mgmt/src/main.c +++ b/tests/subsys/pm/power_mgmt/src/main.c @@ -417,7 +417,7 @@ void test_busy(void) void test_device_state_lock(void) { - pm_device_state_lock((struct device *)device_a); + pm_device_state_lock((const struct device *)device_a); zassert_true(pm_device_state_is_locked(device_a), NULL); testing_device_lock = true; @@ -425,7 +425,7 @@ void test_device_state_lock(void) k_sleep(SLEEP_TIMEOUT); - pm_device_state_unlock((struct device *)device_a); + pm_device_state_unlock((const struct device *)device_a); testing_device_lock = false; }