| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * drivers/media/i2c/lm3560.c |
|---|
| 3 | 4 | * General device driver for TI lm3559, lm3560, FLASH LED Driver |
|---|
| .. | .. |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * Contact: Daniel Jeong <gshark.jeong@gmail.com> |
|---|
| 8 | 9 | * 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. |
|---|
| 18 | 10 | */ |
|---|
| 19 | 11 | |
|---|
| 20 | 12 | #include <linux/delay.h> |
|---|
| .. | .. |
|---|
| 55 | 47 | * @regmap: reg. map for i2c |
|---|
| 56 | 48 | * @lock: muxtex for serial access. |
|---|
| 57 | 49 | * @led_mode: V4L2 LED mode |
|---|
| 58 | | - * @ctrls_led: V4L2 contols |
|---|
| 50 | + * @ctrls_led: V4L2 controls |
|---|
| 59 | 51 | * @subdev_led: V4L2 subdev |
|---|
| 60 | 52 | */ |
|---|
| 61 | 53 | struct lm3560_flash { |
|---|
| .. | .. |
|---|
| 362 | 354 | |
|---|
| 363 | 355 | v4l2_i2c_subdev_init(&flash->subdev_led[led_no], client, &lm3560_ops); |
|---|
| 364 | 356 | 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)); |
|---|
| 366 | 359 | rval = lm3560_init_controls(flash, led_no); |
|---|
| 367 | 360 | if (rval) |
|---|
| 368 | 361 | goto err_out; |
|---|