forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/usb/gspca/sn9c20x.c
....@@ -1,19 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Sonix sn9c201 sn9c202 library
34 *
45 * Copyright (C) 2012 Jean-Francois Moine <http://moinejf.free.fr>
56 * Copyright (C) 2008-2009 microdia project <microdia@googlegroups.com>
67 * Copyright (C) 2009 Brian Johnson <brijohn@gmail.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU General Public License for more details.
178 */
189
1910 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -1613,7 +1604,7 @@
16131604 if (chip->match.addr > 1)
16141605 return -EINVAL;
16151606 if (chip->match.addr == 1)
1616
- strlcpy(chip->name, "sensor", sizeof(chip->name));
1607
+ strscpy(chip->name, "sensor", sizeof(chip->name));
16171608 return 0;
16181609 }
16191610 #endif
....@@ -1646,7 +1637,7 @@
16461637 break;
16471638 case SENSOR_HV7131R:
16481639 sd->i2c_intf = 0x81; /* i2c 400 Kb/s */
1649
- /* fall thru */
1640
+ fallthrough;
16501641 default:
16511642 cam->cam_mode = vga_mode;
16521643 cam->nmodes = ARRAY_SIZE(vga_mode);