Commit b6ed0720 authored by Arvind Yadav's avatar Arvind Yadav Committed by Mark Brown

ASoC: fsl: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/soc.h> work with
const snd_pcm_ops. So mark the non-const structs as const.
Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 06d15a2e
...@@ -870,7 +870,7 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np) ...@@ -870,7 +870,7 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np)
return NULL; return NULL;
} }
static struct snd_pcm_ops fsl_dma_ops = { static const struct snd_pcm_ops fsl_dma_ops = {
.open = fsl_dma_open, .open = fsl_dma_open,
.close = fsl_dma_close, .close = fsl_dma_close,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
......
...@@ -227,7 +227,7 @@ static int snd_imx_pcm_mmap(struct snd_pcm_substream *substream, ...@@ -227,7 +227,7 @@ static int snd_imx_pcm_mmap(struct snd_pcm_substream *substream,
return ret; return ret;
} }
static struct snd_pcm_ops imx_pcm_ops = { static const struct snd_pcm_ops imx_pcm_ops = {
.open = snd_imx_open, .open = snd_imx_open,
.close = snd_imx_close, .close = snd_imx_close,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
......
...@@ -287,7 +287,7 @@ psc_dma_hw_params(struct snd_pcm_substream *substream, ...@@ -287,7 +287,7 @@ psc_dma_hw_params(struct snd_pcm_substream *substream,
return 0; return 0;
} }
static struct snd_pcm_ops psc_dma_ops = { static const struct snd_pcm_ops psc_dma_ops = {
.open = psc_dma_open, .open = psc_dma_open,
.close = psc_dma_close, .close = psc_dma_close,
.hw_free = psc_dma_hw_free, .hw_free = psc_dma_hw_free,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment