hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/input/joystick/iforce/iforce-ff.c
....@@ -1,24 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (c) 2000-2002 Vojtech Pavlik <vojtech@ucw.cz>
34 * Copyright (c) 2001-2002, 2007 Johann Deneux <johann.deneux@gmail.com>
45 *
56 * USB/RS232 I-Force joysticks and wheels.
6
- */
7
-
8
-/*
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program; if not, write to the Free Software
21
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
227 */
238
249 #include "iforce.h"
....@@ -384,12 +369,12 @@
384369 }
385370
386371 switch (effect->u.periodic.waveform) {
387
- case FF_SQUARE: wave_code = 0x20; break;
388
- case FF_TRIANGLE: wave_code = 0x21; break;
389
- case FF_SINE: wave_code = 0x22; break;
390
- case FF_SAW_UP: wave_code = 0x23; break;
391
- case FF_SAW_DOWN: wave_code = 0x24; break;
392
- default: wave_code = 0x20; break;
372
+ case FF_SQUARE: wave_code = 0x20; break;
373
+ case FF_TRIANGLE: wave_code = 0x21; break;
374
+ case FF_SINE: wave_code = 0x22; break;
375
+ case FF_SAW_UP: wave_code = 0x23; break;
376
+ case FF_SAW_DOWN: wave_code = 0x24; break;
377
+ default: wave_code = 0x20; break;
393378 }
394379
395380 if (!old || need_core(old, effect)) {
....@@ -488,9 +473,9 @@
488473 int core_err = 0;
489474
490475 switch (effect->type) {
491
- case FF_SPRING: type = 0x40; break;
492
- case FF_DAMPER: type = 0x41; break;
493
- default: return -1;
476
+ case FF_SPRING: type = 0x40; break;
477
+ case FF_DAMPER: type = 0x41; break;
478
+ default: return -1;
494479 }
495480
496481 if (!old || need_condition_modifier(iforce, old, effect)) {