drivers: constify all device instances

Run cocci script to constify device instances.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2022-01-06 14:10:19 +01:00 committed by Carles Cufí
commit 16062c2e5a
11 changed files with 14 additions and 14 deletions

View file

@ -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;

View file

@ -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;