.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * 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 |
---|
17 | 4 | */ |
---|
18 | 5 | |
---|
19 | 6 | #include <linux/device.h> |
---|
.. | .. |
---|
27 | 14 | #include "device.h" |
---|
28 | 15 | #include "input.h" |
---|
29 | 16 | |
---|
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, |
---|
32 | 19 | 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, |
---|
34 | 21 | KEY_5, KEY_6, KEY_7, KEY_8, KEY_9 }; |
---|
35 | 22 | |
---|
36 | | -static unsigned short keycode_kore[] = { |
---|
| 23 | +static const unsigned short keycode_kore[] = { |
---|
37 | 24 | KEY_FN_F1, /* "menu" */ |
---|
38 | 25 | KEY_FN_F7, /* "lcd backlight */ |
---|
39 | 26 | KEY_FN_F2, /* "control" */ |
---|
.. | .. |
---|
73 | 60 | #define MASCHINE_PADS (16) |
---|
74 | 61 | #define MASCHINE_PAD(X) ((X) + ABS_PRESSURE) |
---|
75 | 62 | |
---|
76 | | -static unsigned short keycode_maschine[] = { |
---|
| 63 | +static const unsigned short keycode_maschine[] = { |
---|
77 | 64 | MASCHINE_BUTTON(40), /* mute */ |
---|
78 | 65 | MASCHINE_BUTTON(39), /* solo */ |
---|
79 | 66 | MASCHINE_BUTTON(38), /* select */ |
---|
.. | .. |
---|
817 | 804 | |
---|
818 | 805 | default: |
---|
819 | 806 | /* no input methods supported on this device */ |
---|
| 807 | + ret = -EINVAL; |
---|
820 | 808 | goto exit_free_idev; |
---|
821 | 809 | } |
---|
822 | 810 | |
---|