ASoC: txx9: constify snd_pcm_ops structures
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Mon, 14 Aug 2017 05:56:33 +0000 (11:26 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 14 Aug 2017 16:21:25 +0000 (17:21 +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/txx9/txx9aclc.c

index 7df95dfa8557d4c6760553fe89ed7cc1074aa1e0..a2bb68fea5a32ae0ccb76f235d6c7ef4df399052 100644 (file)
@@ -271,7 +271,7 @@ static int txx9aclc_pcm_close(struct snd_pcm_substream *substream)
        return 0;
 }
 
-static struct snd_pcm_ops txx9aclc_pcm_ops = {
+static const struct snd_pcm_ops txx9aclc_pcm_ops = {
        .open           = txx9aclc_pcm_open,
        .close          = txx9aclc_pcm_close,
        .ioctl          = snd_pcm_lib_ioctl,