]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: au1x: constify snd_pcm_ops structures
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Mon, 14 Aug 2017 05:56:24 +0000 (11:26 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 14 Aug 2017 16:17:10 +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/au1x/dbdma2.c
sound/soc/au1x/dma.c

index b5d1caa04d8e77e275bfbfaaca2c9e6bd61a92ed..6a035ca0f521f71a17710dc6934d0a836338b372 100644 (file)
@@ -304,7 +304,7 @@ static int au1xpsc_pcm_close(struct snd_pcm_substream *substream)
        return 0;
 }
 
-static struct snd_pcm_ops au1xpsc_pcm_ops = {
+static const struct snd_pcm_ops au1xpsc_pcm_ops = {
        .open           = au1xpsc_pcm_open,
        .close          = au1xpsc_pcm_close,
        .ioctl          = snd_pcm_lib_ioctl,
index fcf5a9adde8170e67c861ca5bd75b9d84c0833af..19457e2b351ec158433497f6ca4d65c7e11c5db3 100644 (file)
@@ -277,7 +277,7 @@ static snd_pcm_uframes_t alchemy_pcm_pointer(struct snd_pcm_substream *ss)
        return bytes_to_frames(ss->runtime, location);
 }
 
-static struct snd_pcm_ops alchemy_pcm_ops = {
+static const struct snd_pcm_ops alchemy_pcm_ops = {
        .open                   = alchemy_pcm_open,
        .close                  = alchemy_pcm_close,
        .ioctl                  = snd_pcm_lib_ioctl,