staging: greybus: audio: constify snd_soc_dai_ops structures
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Mon, 21 Aug 2017 04:58:24 +0000 (10:28 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Aug 2017 01:33:19 +0000 (18:33 -0700)
snd_soc_dai_ops are not supposed to change at runtime. All functions
working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with
const snd_soc_dai_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/audio_codec.c

index 25c8bb4cb0de7dbba8d105e53195344237803ad9..a6d01f0761f32068d14624c22f98c798cf0f7245 100644 (file)
@@ -674,7 +674,7 @@ static int gbcodec_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
        return ret;
 }
 
-static struct snd_soc_dai_ops gbcodec_dai_ops = {
+static const struct snd_soc_dai_ops gbcodec_dai_ops = {
        .startup = gbcodec_startup,
        .shutdown = gbcodec_shutdown,
        .hw_params = gbcodec_hw_params,