forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/usb/gspca/mr97310a.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Mars MR97310A library
34 *
....@@ -24,16 +25,6 @@
2425 *
2526 * The MR97311A support in gspca/mars.c has been helpful in understanding some
2627 * of the registers in these cameras.
27
- *
28
- * This program is free software; you can redistribute it and/or modify
29
- * it under the terms of the GNU General Public License as published by
30
- * the Free Software Foundation; either version 2 of the License, or
31
- * any later version.
32
- *
33
- * This program is distributed in the hope that it will be useful,
34
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
35
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36
- * GNU General Public License for more details.
3728 */
3829
3930 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -296,7 +287,6 @@
296287 return err_code;
297288
298289 err_code = cam_get_response16(gspca_dev, 0x21, 0);
299
- status = data[0];
300290 tries++;
301291 if (err_code < 0)
302292 return err_code;
....@@ -520,7 +510,7 @@
520510 switch (gspca_dev->pixfmt.width) {
521511 case 160:
522512 data[9] |= 0x04; /* reg 8, 2:1 scale down from 320 */
523
- /* fall thru */
513
+ fallthrough;
524514 case 320:
525515 default:
526516 data[3] = 0x28; /* reg 2, H size/8 */
....@@ -530,7 +520,7 @@
530520 break;
531521 case 176:
532522 data[9] |= 0x04; /* reg 8, 2:1 scale down from 352 */
533
- /* fall thru */
523
+ fallthrough;
534524 case 352:
535525 data[3] = 0x2c; /* reg 2, H size/8 */
536526 data[4] = 0x48; /* reg 3, V size/4 */
....@@ -617,10 +607,10 @@
617607 switch (gspca_dev->pixfmt.width) {
618608 case 160:
619609 data[9] |= 0x0c; /* reg 8, 4:1 scale down */
620
- /* fall thru */
610
+ fallthrough;
621611 case 320:
622612 data[9] |= 0x04; /* reg 8, 2:1 scale down */
623
- /* fall thru */
613
+ fallthrough;
624614 case 640:
625615 default:
626616 data[3] = 0x50; /* reg 2, H size/8 */
....@@ -637,7 +627,7 @@
637627
638628 case 176:
639629 data[9] |= 0x04; /* reg 8, 2:1 scale down */
640
- /* fall thru */
630
+ fallthrough;
641631 case 352:
642632 data[3] = 0x2c; /* reg 2, H size */
643633 data[4] = 0x48; /* reg 3, V size */