Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: hda: make snd_kcontrol_new const

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>

authored by

Bhumika Goyal and committed by
Takashi Iwai
fdbf0488 7df3859b

+3 -3
+2 -2
sound/pci/hda/patch_analog.c
··· 505 505 return 1; 506 506 } 507 507 508 - static struct snd_kcontrol_new ad1983_auto_smux_mixer = { 508 + static const struct snd_kcontrol_new ad1983_auto_smux_mixer = { 509 509 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 510 510 .name = "IEC958 Playback Source", 511 511 .info = ad1983_auto_smux_enum_info, ··· 788 788 return 1; 789 789 } 790 790 791 - static struct snd_kcontrol_new ad1988_auto_smux_mixer = { 791 + static const struct snd_kcontrol_new ad1988_auto_smux_mixer = { 792 792 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 793 793 .name = "IEC958 Playback Source", 794 794 .info = ad1988_auto_smux_enum_info,
+1 -1
sound/pci/hda/patch_sigmatel.c
··· 961 961 &spec->cur_smux[smux_idx]); 962 962 } 963 963 964 - static struct snd_kcontrol_new stac_smux_mixer = { 964 + static const struct snd_kcontrol_new stac_smux_mixer = { 965 965 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 966 966 .name = "IEC958 Playback Source", 967 967 /* count set later */