| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * V4L2 flash LED sub-device registration helpers. |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2015 Samsung Electronics Co., Ltd |
|---|
| 5 | 6 | * Author: Jacek Anaszewski <j.anaszewski@samsung.com> |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 8 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 9 | | - * published by the Free Software Foundation. |
|---|
| 10 | 7 | */ |
|---|
| 11 | 8 | |
|---|
| 12 | 9 | #include <linux/led-class-flash.h> |
|---|
| .. | .. |
|---|
| 640 | 637 | v4l2_subdev_init(sd, &v4l2_flash_subdev_ops); |
|---|
| 641 | 638 | sd->internal_ops = &v4l2_flash_subdev_internal_ops; |
|---|
| 642 | 639 | sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; |
|---|
| 643 | | - strlcpy(sd->name, config->dev_name, sizeof(sd->name)); |
|---|
| 640 | + strscpy(sd->name, config->dev_name, sizeof(sd->name)); |
|---|
| 644 | 641 | |
|---|
| 645 | 642 | ret = media_entity_pads_init(&sd->entity, 0, NULL); |
|---|
| 646 | 643 | if (ret < 0) |
|---|