forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/sound/usb/6fire/control.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Linux driver for TerraTec DMX 6Fire USB
34 *
....@@ -10,11 +11,6 @@
1011 * Thanks to:
1112 * - Holger Ruckdeschel: he found out how to control individual channel
1213 * volumes and introduced mute switch
13
- *
14
- * This program is free software; you can redistribute it and/or modify
15
- * it under the terms of the GNU General Public License as published by
16
- * the Free Software Foundation; either version 2 of the License, or
17
- * (at your option) any later version.
1814 */
1915
2016 #include <linux/interrupt.h>
....@@ -401,7 +397,7 @@
401397 return 0;
402398 }
403399
404
-static struct snd_kcontrol_new vol_elements[] = {
400
+static const struct snd_kcontrol_new vol_elements[] = {
405401 {
406402 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
407403 .name = "Analog Playback Volume",
....@@ -441,7 +437,7 @@
441437 {}
442438 };
443439
444
-static struct snd_kcontrol_new mute_elements[] = {
440
+static const struct snd_kcontrol_new mute_elements[] = {
445441 {
446442 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
447443 .name = "Analog Playback Switch",
....@@ -475,7 +471,7 @@
475471 {}
476472 };
477473
478
-static struct snd_kcontrol_new elements[] = {
474
+static const struct snd_kcontrol_new elements[] = {
479475 {
480476 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
481477 .name = "Line/Phono Capture Route",
....@@ -521,7 +517,7 @@
521517 struct control_runtime *rt,
522518 struct snd_card *card,
523519 char *name,
524
- struct snd_kcontrol_new *elems)
520
+ const struct snd_kcontrol_new *elems)
525521 {
526522 int ret;
527523 int i;
....@@ -543,7 +539,7 @@
543539 ret = snd_ctl_add(card, control);
544540 if (ret < 0)
545541 return ret;
546
- ret = snd_ctl_add_slave(vmaster, control);
542
+ ret = snd_ctl_add_follower(vmaster, control);
547543 if (ret < 0)
548544 return ret;
549545 i++;