ASoC: fsl: constify snd_pcm_ops structures
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Mon, 14 Aug 2017 05:56:26 +0000 (11:26 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 14 Aug 2017 16:17:53 +0000 (17:17 +0100)
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>
sound/soc/fsl/fsl_dma.c
sound/soc/fsl/imx-pcm-fiq.c
sound/soc/fsl/mpc5200_dma.c

index ed8ea00..979ed1b 100644 (file)
@@ -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,
index 92410f7..9ce3761 100644 (file)
@@ -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,
index 1f7e70b..66042ce 100644 (file)
@@ -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,