| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 1998-2005 Vojtech Pavlik |
|---|
| 3 | 4 | */ |
|---|
| .. | .. |
|---|
| 7 | 8 | */ |
|---|
| 8 | 9 | |
|---|
| 9 | 10 | /* |
|---|
| 10 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 11 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 12 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 13 | | - * (at your option) any later version. |
|---|
| 14 | | - * |
|---|
| 15 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 16 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 17 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 18 | | - * GNU General Public License for more details. |
|---|
| 19 | | - * |
|---|
| 20 | | - * You should have received a copy of the GNU General Public License |
|---|
| 21 | | - * along with this program; if not, write to the Free Software |
|---|
| 22 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 23 | 11 | */ |
|---|
| 24 | 12 | |
|---|
| 25 | 13 | #include <linux/delay.h> |
|---|
| .. | .. |
|---|
| 235 | 223 | |
|---|
| 236 | 224 | static void sw_init_digital(struct gameport *gameport) |
|---|
| 237 | 225 | { |
|---|
| 238 | | - int seq[] = { 140, 140+725, 140+300, 0 }; |
|---|
| 226 | + static const int seq[] = { 140, 140+725, 140+300, 0 }; |
|---|
| 239 | 227 | unsigned long flags; |
|---|
| 240 | 228 | int i, t; |
|---|
| 241 | 229 | |
|---|
| .. | .. |
|---|
| 668 | 656 | |
|---|
| 669 | 657 | switch (i * m) { |
|---|
| 670 | 658 | case 60: |
|---|
| 671 | | - sw->number++; /* fall through */ |
|---|
| 659 | + sw->number++; |
|---|
| 660 | + fallthrough; |
|---|
| 672 | 661 | case 45: /* Ambiguous packet length */ |
|---|
| 673 | 662 | if (j <= 40) { /* ID length less or eq 40 -> FSP */ |
|---|
| 674 | 663 | case 43: |
|---|
| 675 | 664 | sw->type = SW_ID_FSP; |
|---|
| 676 | 665 | break; |
|---|
| 677 | 666 | } |
|---|
| 678 | | - sw->number++; /* fall through */ |
|---|
| 667 | + sw->number++; |
|---|
| 668 | + fallthrough; |
|---|
| 679 | 669 | case 30: |
|---|
| 680 | | - sw->number++; /* fall through */ |
|---|
| 670 | + sw->number++; |
|---|
| 671 | + fallthrough; |
|---|
| 681 | 672 | case 15: |
|---|
| 682 | 673 | sw->type = SW_ID_GP; |
|---|
| 683 | 674 | break; |
|---|
| .. | .. |
|---|
| 693 | 684 | sw->type = SW_ID_PP; |
|---|
| 694 | 685 | break; |
|---|
| 695 | 686 | case 66: |
|---|
| 696 | | - sw->bits = 3; /* fall through */ |
|---|
| 687 | + sw->bits = 3; |
|---|
| 688 | + fallthrough; |
|---|
| 697 | 689 | case 198: |
|---|
| 698 | | - sw->length = 22; /* fall through */ |
|---|
| 690 | + sw->length = 22; |
|---|
| 691 | + fallthrough; |
|---|
| 699 | 692 | case 64: |
|---|
| 700 | 693 | sw->type = SW_ID_3DP; |
|---|
| 701 | 694 | if (j == 160) |
|---|