diff --git a/drivers/adc/adc_ite_it8xxx2.c b/drivers/adc/adc_ite_it8xxx2.c index 483843ad48..b65a3dd849 100644 --- a/drivers/adc/adc_ite_it8xxx2.c +++ b/drivers/adc/adc_ite_it8xxx2.c @@ -373,7 +373,7 @@ static void adc_context_update_buffer_pointer(struct adc_context *ctx, static void adc_it8xxx2_isr(const void *arg) { - struct device *dev = (struct device *)arg; + const struct device *dev = (const struct device *)arg; struct adc_it8xxx2_data *data = dev->data; LOG_DBG("ADC ISR triggered."); diff --git a/drivers/adc/adc_mcux_adc16.c b/drivers/adc/adc_mcux_adc16.c index e75e6c3837..e85b6e2413 100644 --- a/drivers/adc/adc_mcux_adc16.c +++ b/drivers/adc/adc_mcux_adc16.c @@ -76,7 +76,7 @@ struct mcux_adc16_data { static void adc_dma_callback(const struct device *dma_dev, void *callback_arg, uint32_t channel, int error_code) { - struct device *dev = (struct device *)callback_arg; + const struct device *dev = (const struct device *)callback_arg; struct mcux_adc16_data *data = dev->data; LOG_DBG("DMA done"); diff --git a/drivers/counter/counter_esp32.c b/drivers/counter/counter_esp32.c index 8198aba10e..38ae0d55ad 100644 --- a/drivers/counter/counter_esp32.c +++ b/drivers/counter/counter_esp32.c @@ -242,7 +242,7 @@ static const struct counter_driver_api counter_api = { static void counter_esp32_isr(void *arg) { - struct device *dev = (struct device *)arg; + const struct device *dev = (const struct device *)arg; struct counter_esp32_data *data = dev->data; counter_esp32_cancel_alarm(dev, 0); uint32_t now; diff --git a/drivers/ethernet/eth_sam_gmac.c b/drivers/ethernet/eth_sam_gmac.c index 3c425d296f..104615dab1 100644 --- a/drivers/ethernet/eth_sam_gmac.c +++ b/drivers/ethernet/eth_sam_gmac.c @@ -1822,7 +1822,7 @@ static void phy_link_state_changed(const struct device *pdev, struct phy_link_state *state, void *user_data) { - const struct device *dev = (struct device *) user_data; + const struct device *dev = (const struct device *) user_data; struct eth_sam_dev_data *const dev_data = dev->data; const struct eth_sam_dev_cfg *const cfg = dev->config; bool is_up; diff --git a/drivers/i2c/i2c_esp32.c b/drivers/i2c/i2c_esp32.c index b61f53e67f..1aa443c9de 100644 --- a/drivers/i2c/i2c_esp32.c +++ b/drivers/i2c/i2c_esp32.c @@ -593,7 +593,7 @@ static int IRAM_ATTR i2c_esp32_transfer(const struct device *dev, struct i2c_msg static void IRAM_ATTR i2c_esp32_isr(void *arg) { - struct device *dev = (struct device *)arg; + const struct device *dev = (const struct device *)arg; struct i2c_esp32_data *data = (struct i2c_esp32_data *const)(dev)->data; i2c_intr_event_t evt_type = I2C_INTR_EVENT_ERR; diff --git a/drivers/i2c/i2c_ite_it8xxx2.c b/drivers/i2c/i2c_ite_it8xxx2.c index 47c8aadbaa..f339d3a2b2 100644 --- a/drivers/i2c/i2c_ite_it8xxx2.c +++ b/drivers/i2c/i2c_ite_it8xxx2.c @@ -883,7 +883,7 @@ static int i2c_it8xxx2_transfer(const struct device *dev, struct i2c_msg *msgs, static void i2c_it8xxx2_isr(void *arg) { - struct device *dev = (struct device *)arg; + const struct device *dev = (const struct device *)arg; struct i2c_it8xxx2_data *data = dev->data; const struct i2c_it8xxx2_config *config = dev->config; diff --git a/drivers/i2c/i2c_mchp_xec.c b/drivers/i2c/i2c_mchp_xec.c index 2d258cb13f..b41725527e 100644 --- a/drivers/i2c/i2c_mchp_xec.c +++ b/drivers/i2c/i2c_mchp_xec.c @@ -726,7 +726,7 @@ static int i2c_xec_transfer(const struct device *dev, struct i2c_msg *msgs, static void i2c_xec_bus_isr(void *arg) { #ifdef CONFIG_I2C_SLAVE - struct device *dev = (struct device *)arg; + const struct device *dev = (const struct device *)arg; const struct i2c_xec_config *config = (const struct i2c_xec_config *const) (dev->config); struct i2c_xec_data *data = dev->data; diff --git a/drivers/i2c/i2c_mchp_xec_v2.c b/drivers/i2c/i2c_mchp_xec_v2.c index 71744774c8..6fd1a43081 100644 --- a/drivers/i2c/i2c_mchp_xec_v2.c +++ b/drivers/i2c/i2c_mchp_xec_v2.c @@ -801,7 +801,7 @@ static int i2c_xec_transfer(const struct device *dev, struct i2c_msg *msgs, static void i2c_xec_bus_isr(void *arg) { #ifdef CONFIG_I2C_SLAVE - struct device *dev = (struct device *)arg; + const struct device *dev = (const struct device *)arg; const struct i2c_xec_config *cfg = (const struct i2c_xec_config *const) (dev->config); struct i2c_xec_data *data = dev->data; diff --git a/drivers/i2s/i2s_mcux_flexcomm.c b/drivers/i2s/i2s_mcux_flexcomm.c index 4cd096f932..4c653a8dc7 100644 --- a/drivers/i2s/i2s_mcux_flexcomm.c +++ b/drivers/i2s/i2s_mcux_flexcomm.c @@ -414,7 +414,7 @@ static void i2s_mcux_config_dma_blocks(const struct device *dev, static void i2s_mcux_dma_tx_callback(const struct device *dma_dev, void *arg, uint32_t channel, int status) { - const struct device *dev = (struct device *)arg; + const struct device *dev = (const struct device *)arg; struct i2s_mcux_data *dev_data = dev->data; struct stream *stream = &dev_data->tx; void *buffer; @@ -474,7 +474,7 @@ static void i2s_mcux_dma_tx_callback(const struct device *dma_dev, void *arg, static void i2s_mcux_dma_rx_callback(const struct device *dma_dev, void *arg, uint32_t channel, int status) { - struct device *dev = (struct device *)arg; + const struct device *dev = (const struct device *)arg; struct i2s_mcux_data *dev_data = dev->data; struct stream *stream = &dev_data->rx; void *buffer; diff --git a/drivers/i2s/i2s_mcux_sai.c b/drivers/i2s/i2s_mcux_sai.c index 2ae0d1888c..38e297cfb5 100644 --- a/drivers/i2s/i2s_mcux_sai.c +++ b/drivers/i2s/i2s_mcux_sai.c @@ -186,7 +186,7 @@ static void i2s_rx_stream_disable(const struct device *dev) static void i2s_dma_tx_callback(const struct device *dma_dev, void *arg, uint32_t channel, int status) { - const struct device *dev = (struct device *)arg; + const struct device *dev = (const struct device *)arg; const struct i2s_mcux_config *dev_cfg = dev->config; I2S_Type *base = (I2S_Type *)dev_cfg->base; struct i2s_dev_data *dev_data = dev->data; @@ -257,7 +257,7 @@ static void i2s_dma_tx_callback(const struct device *dma_dev, static void i2s_dma_rx_callback(const struct device *dma_dev, void *arg, uint32_t channel, int status) { - struct device *dev = (struct device *)arg; + const struct device *dev = (const struct device *)arg; const struct i2s_mcux_config *dev_cfg = dev->config; I2S_Type *base = (I2S_Type *)dev_cfg->base; struct i2s_dev_data *dev_data = dev->data; @@ -928,7 +928,7 @@ static void sai_driver_irq(const struct device *dev) /* clear IRQ sources atm */ static void i2s_mcux_isr(void *arg) { - struct device *dev = (struct device *)arg; + const struct device *dev = (const struct device *)arg; const struct i2s_mcux_config *dev_cfg = dev->config; I2S_Type *base = (I2S_Type *)dev_cfg->base; diff --git a/drivers/spi/spi_mcux_dspi.c b/drivers/spi/spi_mcux_dspi.c index e91a154e74..86554bfda3 100644 --- a/drivers/spi/spi_mcux_dspi.c +++ b/drivers/spi/spi_mcux_dspi.c @@ -472,7 +472,7 @@ static int configure_dma(const struct device *dev) static void dma_callback(const struct device *dma_dev, void *callback_arg, uint32_t channel, int error_code) { - const struct device *dev = (struct device *)callback_arg; + const struct device *dev = (const struct device *)callback_arg; const struct spi_mcux_config *config = dev->config; SPI_Type *base = config->base; struct spi_mcux_data *data = dev->data;