.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2007 Daniel Mack |
---|
3 | 4 | * 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 |
---|
18 | 5 | */ |
---|
19 | 6 | |
---|
20 | 7 | #include <linux/device.h> |
---|
.. | .. |
---|
176 | 163 | int index; |
---|
177 | 164 | }; |
---|
178 | 165 | |
---|
179 | | -static struct caiaq_controller ak1_controller[] = { |
---|
| 166 | +static const struct caiaq_controller ak1_controller[] = { |
---|
180 | 167 | { "LED left", 2 }, |
---|
181 | 168 | { "LED middle", 1 }, |
---|
182 | 169 | { "LED right", 0 }, |
---|
183 | 170 | { "LED ring", 3 } |
---|
184 | 171 | }; |
---|
185 | 172 | |
---|
186 | | -static struct caiaq_controller rk2_controller[] = { |
---|
| 173 | +static const struct caiaq_controller rk2_controller[] = { |
---|
187 | 174 | { "LED 1", 5 }, |
---|
188 | 175 | { "LED 2", 4 }, |
---|
189 | 176 | { "LED 3", 3 }, |
---|
.. | .. |
---|
209 | 196 | { "LED 7seg_3g", 23 } |
---|
210 | 197 | }; |
---|
211 | 198 | |
---|
212 | | -static struct caiaq_controller rk3_controller[] = { |
---|
| 199 | +static const struct caiaq_controller rk3_controller[] = { |
---|
213 | 200 | { "LED 7seg_1a", 0 + 0 }, |
---|
214 | 201 | { "LED 7seg_1b", 0 + 1 }, |
---|
215 | 202 | { "LED 7seg_1c", 0 + 2 }, |
---|
.. | .. |
---|
257 | 244 | { "LED pedal", 32 + 8 } |
---|
258 | 245 | }; |
---|
259 | 246 | |
---|
260 | | -static struct caiaq_controller kore_controller[] = { |
---|
| 247 | +static const struct caiaq_controller kore_controller[] = { |
---|
261 | 248 | { "LED F1", 8 | CNT_INTVAL }, |
---|
262 | 249 | { "LED F2", 12 | CNT_INTVAL }, |
---|
263 | 250 | { "LED F3", 0 | CNT_INTVAL }, |
---|
.. | .. |
---|
291 | 278 | { "LED control", 26 | CNT_INTVAL } |
---|
292 | 279 | }; |
---|
293 | 280 | |
---|
294 | | -static struct caiaq_controller a8dj_controller[] = { |
---|
| 281 | +static const struct caiaq_controller a8dj_controller[] = { |
---|
295 | 282 | { "Current input mode", 0 | CNT_INTVAL }, |
---|
296 | 283 | { "GND lift for TC Vinyl mode", 24 + 0 }, |
---|
297 | 284 | { "GND lift for TC CD/Line mode", 24 + 1 }, |
---|
.. | .. |
---|
299 | 286 | { "Software lock", 40 } |
---|
300 | 287 | }; |
---|
301 | 288 | |
---|
302 | | -static struct caiaq_controller a4dj_controller[] = { |
---|
| 289 | +static const struct caiaq_controller a4dj_controller[] = { |
---|
303 | 290 | { "Current input mode", 0 | CNT_INTVAL } |
---|
304 | 291 | }; |
---|
305 | 292 | |
---|
306 | | -static struct caiaq_controller kontrolx1_controller[] = { |
---|
| 293 | +static const struct caiaq_controller kontrolx1_controller[] = { |
---|
307 | 294 | { "LED FX A: ON", 7 | CNT_INTVAL }, |
---|
308 | 295 | { "LED FX A: 1", 6 | CNT_INTVAL }, |
---|
309 | 296 | { "LED FX A: 2", 5 | CNT_INTVAL }, |
---|
.. | .. |
---|
340 | 327 | { "LED Deck B: SYNC", 8 | CNT_INTVAL }, |
---|
341 | 328 | }; |
---|
342 | 329 | |
---|
343 | | -static struct caiaq_controller kontrols4_controller[] = { |
---|
| 330 | +static const struct caiaq_controller kontrols4_controller[] = { |
---|
344 | 331 | { "LED: Master: Quant", 10 | CNT_INTVAL }, |
---|
345 | 332 | { "LED: Master: Headphone", 11 | CNT_INTVAL }, |
---|
346 | 333 | { "LED: Master: Master", 12 | CNT_INTVAL }, |
---|
.. | .. |
---|
513 | 500 | { "LED: FX2: Mode", 133 | CNT_INTVAL }, |
---|
514 | 501 | }; |
---|
515 | 502 | |
---|
516 | | -static struct caiaq_controller maschine_controller[] = { |
---|
| 503 | +static const struct caiaq_controller maschine_controller[] = { |
---|
517 | 504 | { "LED: Pad 1", 3 | CNT_INTVAL }, |
---|
518 | 505 | { "LED: Pad 2", 2 | CNT_INTVAL }, |
---|
519 | 506 | { "LED: Pad 3", 1 | CNT_INTVAL }, |
---|
.. | .. |
---|
581 | 568 | { "Backlight Display", 59 | CNT_INTVAL } |
---|
582 | 569 | }; |
---|
583 | 570 | |
---|
584 | | -static int add_controls(struct caiaq_controller *c, int num, |
---|
| 571 | +static int add_controls(const struct caiaq_controller *c, int num, |
---|
585 | 572 | struct snd_usb_caiaqdev *cdev) |
---|
586 | 573 | { |
---|
587 | 574 | int i, ret; |
---|