forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/sound/usb/caiaq/control.c
....@@ -1,20 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (c) 2007 Daniel Mack
34 * friendly supported by NI.
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation; either version 2 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, write to the Free Software
17
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
185 */
196
207 #include <linux/device.h>
....@@ -176,14 +163,14 @@
176163 int index;
177164 };
178165
179
-static struct caiaq_controller ak1_controller[] = {
166
+static const struct caiaq_controller ak1_controller[] = {
180167 { "LED left", 2 },
181168 { "LED middle", 1 },
182169 { "LED right", 0 },
183170 { "LED ring", 3 }
184171 };
185172
186
-static struct caiaq_controller rk2_controller[] = {
173
+static const struct caiaq_controller rk2_controller[] = {
187174 { "LED 1", 5 },
188175 { "LED 2", 4 },
189176 { "LED 3", 3 },
....@@ -209,7 +196,7 @@
209196 { "LED 7seg_3g", 23 }
210197 };
211198
212
-static struct caiaq_controller rk3_controller[] = {
199
+static const struct caiaq_controller rk3_controller[] = {
213200 { "LED 7seg_1a", 0 + 0 },
214201 { "LED 7seg_1b", 0 + 1 },
215202 { "LED 7seg_1c", 0 + 2 },
....@@ -257,7 +244,7 @@
257244 { "LED pedal", 32 + 8 }
258245 };
259246
260
-static struct caiaq_controller kore_controller[] = {
247
+static const struct caiaq_controller kore_controller[] = {
261248 { "LED F1", 8 | CNT_INTVAL },
262249 { "LED F2", 12 | CNT_INTVAL },
263250 { "LED F3", 0 | CNT_INTVAL },
....@@ -291,7 +278,7 @@
291278 { "LED control", 26 | CNT_INTVAL }
292279 };
293280
294
-static struct caiaq_controller a8dj_controller[] = {
281
+static const struct caiaq_controller a8dj_controller[] = {
295282 { "Current input mode", 0 | CNT_INTVAL },
296283 { "GND lift for TC Vinyl mode", 24 + 0 },
297284 { "GND lift for TC CD/Line mode", 24 + 1 },
....@@ -299,11 +286,11 @@
299286 { "Software lock", 40 }
300287 };
301288
302
-static struct caiaq_controller a4dj_controller[] = {
289
+static const struct caiaq_controller a4dj_controller[] = {
303290 { "Current input mode", 0 | CNT_INTVAL }
304291 };
305292
306
-static struct caiaq_controller kontrolx1_controller[] = {
293
+static const struct caiaq_controller kontrolx1_controller[] = {
307294 { "LED FX A: ON", 7 | CNT_INTVAL },
308295 { "LED FX A: 1", 6 | CNT_INTVAL },
309296 { "LED FX A: 2", 5 | CNT_INTVAL },
....@@ -340,7 +327,7 @@
340327 { "LED Deck B: SYNC", 8 | CNT_INTVAL },
341328 };
342329
343
-static struct caiaq_controller kontrols4_controller[] = {
330
+static const struct caiaq_controller kontrols4_controller[] = {
344331 { "LED: Master: Quant", 10 | CNT_INTVAL },
345332 { "LED: Master: Headphone", 11 | CNT_INTVAL },
346333 { "LED: Master: Master", 12 | CNT_INTVAL },
....@@ -513,7 +500,7 @@
513500 { "LED: FX2: Mode", 133 | CNT_INTVAL },
514501 };
515502
516
-static struct caiaq_controller maschine_controller[] = {
503
+static const struct caiaq_controller maschine_controller[] = {
517504 { "LED: Pad 1", 3 | CNT_INTVAL },
518505 { "LED: Pad 2", 2 | CNT_INTVAL },
519506 { "LED: Pad 3", 1 | CNT_INTVAL },
....@@ -581,7 +568,7 @@
581568 { "Backlight Display", 59 | CNT_INTVAL }
582569 };
583570
584
-static int add_controls(struct caiaq_controller *c, int num,
571
+static int add_controls(const struct caiaq_controller *c, int num,
585572 struct snd_usb_caiaqdev *cdev)
586573 {
587574 int i, ret;