summaryrefslogtreecommitdiff
path: root/sound/pci/ca0106
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-02-19 21:48:09 +0300
committerTakashi Iwai <tiwai@suse.de>2017-02-22 00:01:21 +0300
commitf3b827e0b1841f4cfc18436e09f4f269f3be908e (patch)
tree335d398cbfe7e913ecb2c9ceb33a702851b1caa0 /sound/pci/ca0106
parent34371d236eab28933eefc0d77bd1e3df62fc585b (diff)
downloadlinux-f3b827e0b1841f4cfc18436e09f4f269f3be908e.tar.xz
ALSA: pci: constify snd_kcontrol_new structures
Declare snd_kcontrol_new structures as const as they are only passed as an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having the same property can be made const too. Done using Coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct snd_kcontrol_new i@p = {...}; @ok1@ identifier r1.i; position p; expression e1; @@ snd_ctl_new1(&i@p,e1) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct snd_kcontrol_new i; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ca0106')
-rw-r--r--sound/pci/ca0106/ca0106_mixer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c
index 025805cba779..b4d3415331f6 100644
--- a/sound/pci/ca0106/ca0106_mixer.c
+++ b/sound/pci/ca0106/ca0106_mixer.c
@@ -301,7 +301,7 @@ static int snd_ca0106_capture_mic_line_in_put(struct snd_kcontrol *kcontrol,
return change;
}
-static struct snd_kcontrol_new snd_ca0106_capture_mic_line_in =
+static const struct snd_kcontrol_new snd_ca0106_capture_mic_line_in =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Shared Mic/Line in Capture Switch",
@@ -310,7 +310,7 @@ static struct snd_kcontrol_new snd_ca0106_capture_mic_line_in =
.put = snd_ca0106_capture_mic_line_in_put
};
-static struct snd_kcontrol_new snd_ca0106_capture_line_in_side_out =
+static const struct snd_kcontrol_new snd_ca0106_capture_line_in_side_out =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Shared Line in/Side out Capture Switch",