hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/input/joystick/db9.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (c) 1999-2001 Vojtech Pavlik
34 *
....@@ -10,19 +11,6 @@
1011 */
1112
1213 /*
13
- * This program is free software; you can redistribute it and/or modify
14
- * it under the terms of the GNU General Public License as published by
15
- * the Free Software Foundation; either version 2 of the License, or
16
- * (at your option) any later version.
17
- *
18
- * This program is distributed in the hope that it will be useful,
19
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- * GNU General Public License for more details.
22
- *
23
- * You should have received a copy of the GNU General Public License
24
- * along with this program; if not, write to the Free Software
25
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2614 */
2715
2816 #include <linux/kernel.h>
....@@ -259,7 +247,7 @@
259247 db9_saturn_write_sub(port, type, 3, powered, 0);
260248 return data[0] = 0xe3;
261249 }
262
- /* else: fall through */
250
+ fallthrough;
263251 default:
264252 return data[0];
265253 }
....@@ -279,14 +267,14 @@
279267 switch (data[j]) {
280268 case 0x16: /* multi controller (analog 4 axis) */
281269 input_report_abs(dev, db9_abs[5], data[j + 6]);
282
- /* fall through */
270
+ fallthrough;
283271 case 0x15: /* mission stick (analog 3 axis) */
284272 input_report_abs(dev, db9_abs[3], data[j + 4]);
285273 input_report_abs(dev, db9_abs[4], data[j + 5]);
286
- /* fall through */
274
+ fallthrough;
287275 case 0x13: /* racing controller (analog 1 axis) */
288276 input_report_abs(dev, db9_abs[2], data[j + 3]);
289
- /* fall through */
277
+ fallthrough;
290278 case 0x34: /* saturn keyboard (udlr ZXC ASD QE Esc) */
291279 case 0x02: /* digital pad (digital 2 axis + buttons) */
292280 input_report_abs(dev, db9_abs[0], !(data[j + 1] & 128) - !(data[j + 1] & 64));
....@@ -380,7 +368,7 @@
380368 input_report_abs(dev2, ABS_X, (data & DB9_RIGHT ? 0 : 1) - (data & DB9_LEFT ? 0 : 1));
381369 input_report_abs(dev2, ABS_Y, (data & DB9_DOWN ? 0 : 1) - (data & DB9_UP ? 0 : 1));
382370 input_report_key(dev2, BTN_TRIGGER, ~data & DB9_FIRE1);
383
- /* fall through */
371
+ fallthrough;
384372
385373 case DB9_MULTI_0802:
386374