aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/cs46xx
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-05-17 17:39:03 +0530
committerTakashi Iwai <tiwai@suse.de>2017-05-21 09:08:10 +0200
commit30b5817e092159feb36b29eb5d7b31e28866280e (patch)
tree5dfe7ae991f9c3343f9be22bbad00caa874a8056 /sound/pci/cs46xx
parent6ba1ad386c30487aaa18a56da71fa12591131dd6 (diff)
downloadlinux-stericsson-30b5817e092159feb36b29eb5d7b31e28866280e.tar.gz
ALSA: cs46xx: constify snd_kcontrol_new structures
Declare snd_kcontrol_new structures as const as they are only passed an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having this property can be made const. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct snd_kcontrol_new x@p={...}; @ok@ identifier r.x; position p; @@ snd_ctl_new1(&x@p,...) @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct snd_kcontrol_new x; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/cs46xx')
-rw-r--r--sound/pci/cs46xx/cs46xx_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index e4cf3187b4dd..00fa52e9a2f2 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -2371,7 +2371,7 @@ static int snd_cs46xx_front_dup_put(struct snd_kcontrol *kcontrol,
ucontrol->value.integer.value[0] ? 0 : 0x200);
}
-static struct snd_kcontrol_new snd_cs46xx_front_dup_ctl = {
+static const struct snd_kcontrol_new snd_cs46xx_front_dup_ctl = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Duplicate Front",
.info = snd_mixer_boolean_info,