ALSA: hda: make snd_kcontrol_new const
authorBhumika Goyal <bhumirks@gmail.com>
Wed, 16 Aug 2017 08:44:11 +0000 (14:14 +0530)
committerTakashi Iwai <tiwai@suse.de>
Wed, 16 Aug 2017 12:29:08 +0000 (14:29 +0200)
Make these const as they are only passed as the 3rd argument to the
function snd_hda_gen_add_kctl, which is of type const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_analog.c
sound/pci/hda/patch_sigmatel.c

index e0fb8c6d1bc274e4ff5f6a8bf55afa9852bf9026..757857313426b194c5df1a2952fb008271df3748 100644 (file)
@@ -505,7 +505,7 @@ static int ad1983_auto_smux_enum_put(struct snd_kcontrol *kcontrol,
        return 1;
 }
 
-static struct snd_kcontrol_new ad1983_auto_smux_mixer = {
+static const struct snd_kcontrol_new ad1983_auto_smux_mixer = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "IEC958 Playback Source",
        .info = ad1983_auto_smux_enum_info,
@@ -788,7 +788,7 @@ static int ad1988_auto_smux_enum_put(struct snd_kcontrol *kcontrol,
        return 1;
 }
 
-static struct snd_kcontrol_new ad1988_auto_smux_mixer = {
+static const struct snd_kcontrol_new ad1988_auto_smux_mixer = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "IEC958 Playback Source",
        .info = ad1988_auto_smux_enum_info,
index 6cefdf6c0b758770e2615126285d7cd83d736d64..63d15b545b333b0cf0bcf282cc96e2594fe5ec9c 100644 (file)
@@ -961,7 +961,7 @@ static int stac_smux_enum_put(struct snd_kcontrol *kcontrol,
                                     &spec->cur_smux[smux_idx]);
 }
 
-static struct snd_kcontrol_new stac_smux_mixer = {
+static const struct snd_kcontrol_new stac_smux_mixer = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "IEC958 Playback Source",
        /* count set later */