]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: codecs: make snd_soc_dai_driver and snd_soc_component_driver const
authorBhumika Goyal <bhumirks@gmail.com>
Wed, 16 Aug 2017 17:15:09 +0000 (22:45 +0530)
committerMark Brown <broonie@kernel.org>
Thu, 17 Aug 2017 17:10:34 +0000 (18:10 +0100)
Make these two structure variables const as they are either used in a
copy operation or passed to devm_snd_soc_register_component having the
corresponding argument as const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/hdmi-codec.c
sound/soc/codecs/lm4857.c
sound/soc/codecs/max9768.c

index f288404f0a6134a2c166a195b8e16945d7705ea7..d73d2c1ed8239d166a27f23161046d92a916571e 100644 (file)
@@ -692,7 +692,7 @@ static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtime *rtd,
        return snd_ctl_add(rtd->card->snd_card, kctl);
 }
 
-static struct snd_soc_dai_driver hdmi_i2s_dai = {
+static const struct snd_soc_dai_driver hdmi_i2s_dai = {
        .name = "i2s-hifi",
        .id = DAI_ID_I2S,
        .playback = {
index 558de1053f73ce52934747f50ef16a702e48a0a4..1e964079642adc5e53ad06e1bbd8fc72c7b62786 100644 (file)
@@ -100,7 +100,7 @@ static const struct snd_soc_dapm_route lm4857_routes[] = {
        { "EP", "Earpiece", "Mode" },
 };
 
-static struct snd_soc_component_driver lm4857_component_driver = {
+static const struct snd_soc_component_driver lm4857_component_driver = {
        .controls = lm4857_controls,
        .num_controls = ARRAY_SIZE(lm4857_controls),
        .dapm_widgets = lm4857_dapm_widgets,
index 5b82e26cd5d1ae506acebf9394629e03bfa73b12..7017c0389e73ccaad575350be8b9c1ddb72b8be1 100644 (file)
@@ -151,7 +151,7 @@ static int max9768_probe(struct snd_soc_component *component)
        return 0;
 }
 
-static struct snd_soc_component_driver max9768_component_driver = {
+static const struct snd_soc_component_driver max9768_component_driver = {
        .probe = max9768_probe,
        .controls = max9768_volume,
        .num_controls = ARRAY_SIZE(max9768_volume),