hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/sound/usb/caiaq/input.c
....@@ -1,19 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (c) 2006,2007 Daniel Mack, Tim Ruetz
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License
15
- * along with this program; if not, write to the Free Software
16
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
174 */
185
196 #include <linux/device.h>
....@@ -27,13 +14,13 @@
2714 #include "device.h"
2815 #include "input.h"
2916
30
-static unsigned short keycode_ak1[] = { KEY_C, KEY_B, KEY_A };
31
-static unsigned short keycode_rk2[] = { KEY_1, KEY_2, KEY_3, KEY_4,
17
+static const unsigned short keycode_ak1[] = { KEY_C, KEY_B, KEY_A };
18
+static const unsigned short keycode_rk2[] = { KEY_1, KEY_2, KEY_3, KEY_4,
3219 KEY_5, KEY_6, KEY_7 };
33
-static unsigned short keycode_rk3[] = { KEY_1, KEY_2, KEY_3, KEY_4,
20
+static const unsigned short keycode_rk3[] = { KEY_1, KEY_2, KEY_3, KEY_4,
3421 KEY_5, KEY_6, KEY_7, KEY_8, KEY_9 };
3522
36
-static unsigned short keycode_kore[] = {
23
+static const unsigned short keycode_kore[] = {
3724 KEY_FN_F1, /* "menu" */
3825 KEY_FN_F7, /* "lcd backlight */
3926 KEY_FN_F2, /* "control" */
....@@ -73,7 +60,7 @@
7360 #define MASCHINE_PADS (16)
7461 #define MASCHINE_PAD(X) ((X) + ABS_PRESSURE)
7562
76
-static unsigned short keycode_maschine[] = {
63
+static const unsigned short keycode_maschine[] = {
7764 MASCHINE_BUTTON(40), /* mute */
7865 MASCHINE_BUTTON(39), /* solo */
7966 MASCHINE_BUTTON(38), /* select */
....@@ -817,6 +804,7 @@
817804
818805 default:
819806 /* no input methods supported on this device */
807
+ ret = -EINVAL;
820808 goto exit_free_idev;
821809 }
822810