summaryrefslogtreecommitdiffstats
path: root/sound/aoa
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-08-16 04:44:09 -0400
committerTakashi Iwai <tiwai@suse.de>2017-08-16 08:29:06 -0400
commitbb1c928df78ee6e3665a0d013e74108cc9abf34b (patch)
tree54548800f9adfc2934b0da54fcdba17d9663b886 /sound/aoa
parenteb2c18309491325381172cc2838006c5e9fdd0f4 (diff)
ALSA: aoa: make snd_kcontrol_new const
Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/aoa')
-rw-r--r--sound/aoa/codecs/onyx.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c
index a04edff8b729..d2d96ca082b7 100644
--- a/sound/aoa/codecs/onyx.c
+++ b/sound/aoa/codecs/onyx.c
@@ -167,7 +167,7 @@ static int onyx_snd_vol_put(struct snd_kcontrol *kcontrol,
167 return 1; 167 return 1;
168} 168}
169 169
170static struct snd_kcontrol_new volume_control = { 170static const struct snd_kcontrol_new volume_control = {
171 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 171 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
172 .name = "Master Playback Volume", 172 .name = "Master Playback Volume",
173 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, 173 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
@@ -229,7 +229,7 @@ static int onyx_snd_inputgain_put(struct snd_kcontrol *kcontrol,
229 return n != v; 229 return n != v;
230} 230}
231 231
232static struct snd_kcontrol_new inputgain_control = { 232static const struct snd_kcontrol_new inputgain_control = {
233 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 233 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
234 .name = "Master Capture Volume", 234 .name = "Master Capture Volume",
235 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, 235 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
@@ -284,7 +284,7 @@ static int onyx_snd_capture_source_put(struct snd_kcontrol *kcontrol,
284 return 1; 284 return 1;
285} 285}
286 286
287static struct snd_kcontrol_new capture_source_control = { 287static const struct snd_kcontrol_new capture_source_control = {
288 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 288 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
289 /* If we name this 'Input Source', it properly shows up in 289 /* If we name this 'Input Source', it properly shows up in
290 * alsamixer as a selection, * but it's shown under the 290 * alsamixer as a selection, * but it's shown under the
@@ -348,7 +348,7 @@ static int onyx_snd_mute_put(struct snd_kcontrol *kcontrol,
348 return !err ? (v != c) : err; 348 return !err ? (v != c) : err;
349} 349}
350 350
351static struct snd_kcontrol_new mute_control = { 351static const struct snd_kcontrol_new mute_control = {
352 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 352 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
353 .name = "Master Playback Switch", 353 .name = "Master Playback Switch",
354 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, 354 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
@@ -476,7 +476,7 @@ static int onyx_spdif_mask_get(struct snd_kcontrol *kcontrol,
476 return 0; 476 return 0;
477} 477}
478 478
479static struct snd_kcontrol_new onyx_spdif_mask = { 479static const struct snd_kcontrol_new onyx_spdif_mask = {
480 .access = SNDRV_CTL_ELEM_ACCESS_READ, 480 .access = SNDRV_CTL_ELEM_ACCESS_READ,
481 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 481 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
482 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK), 482 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK),
@@ -533,7 +533,7 @@ static int onyx_spdif_put(struct snd_kcontrol *kcontrol,
533 return 1; 533 return 1;
534} 534}
535 535
536static struct snd_kcontrol_new onyx_spdif_ctrl = { 536static const struct snd_kcontrol_new onyx_spdif_ctrl = {
537 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, 537 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
538 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 538 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
539 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), 539 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),