forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/media/i2c/lm3560.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * drivers/media/i2c/lm3560.c
34 * General device driver for TI lm3559, lm3560, FLASH LED Driver
....@@ -6,15 +7,6 @@
67 *
78 * Contact: Daniel Jeong <gshark.jeong@gmail.com>
89 * Ldd-Mlp <ldd-mlp@list.ti.com>
9
- *
10
- * This program is free software; you can redistribute it and/or
11
- * modify it under the terms of the GNU General Public License
12
- * version 2 as published by the Free Software Foundation.
13
- *
14
- * This program is distributed in the hope that it will be useful, but
15
- * WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
- * General Public License for more details.
1810 */
1911
2012 #include <linux/delay.h>
....@@ -55,7 +47,7 @@
5547 * @regmap: reg. map for i2c
5648 * @lock: muxtex for serial access.
5749 * @led_mode: V4L2 LED mode
58
- * @ctrls_led: V4L2 contols
50
+ * @ctrls_led: V4L2 controls
5951 * @subdev_led: V4L2 subdev
6052 */
6153 struct lm3560_flash {
....@@ -362,7 +354,8 @@
362354
363355 v4l2_i2c_subdev_init(&flash->subdev_led[led_no], client, &lm3560_ops);
364356 flash->subdev_led[led_no].flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
365
- strcpy(flash->subdev_led[led_no].name, led_name);
357
+ strscpy(flash->subdev_led[led_no].name, led_name,
358
+ sizeof(flash->subdev_led[led_no].name));
366359 rval = lm3560_init_controls(flash, led_no);
367360 if (rval)
368361 goto err_out;