mirror of https://gitee.com/openkylin/linux.git
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: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
06d15a2ede
commit
b6ed072028
|
@ -870,7 +870,7 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static struct snd_pcm_ops fsl_dma_ops = {
|
||||
static const struct snd_pcm_ops fsl_dma_ops = {
|
||||
.open = fsl_dma_open,
|
||||
.close = fsl_dma_close,
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
||||
|
|
|
@ -227,7 +227,7 @@ static int snd_imx_pcm_mmap(struct snd_pcm_substream *substream,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct snd_pcm_ops imx_pcm_ops = {
|
||||
static const struct snd_pcm_ops imx_pcm_ops = {
|
||||
.open = snd_imx_open,
|
||||
.close = snd_imx_close,
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
||||
|
|
|
@ -287,7 +287,7 @@ psc_dma_hw_params(struct snd_pcm_substream *substream,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_pcm_ops psc_dma_ops = {
|
||||
static const struct snd_pcm_ops psc_dma_ops = {
|
||||
.open = psc_dma_open,
|
||||
.close = psc_dma_close,
|
||||
.hw_free = psc_dma_hw_free,
|
||||
|
|
Loading…
Reference in New Issue