diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-10 14:19:16 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-03-29 15:26:13 +0100 |
commit | 85709cbf152465c77a9c2de48a6f4ef23c8c3d83 (patch) | |
tree | 4dc492b6da48d0d1f9ede150c0c2386f4efb6438 /drivers/media/platform/sunxi/sun6i-csi | |
parent | media: vim2m: Fix RGB 565 BE/LE support (diff) | |
download | linux-85709cbf152465c77a9c2de48a6f4ef23c8c3d83.tar.xz linux-85709cbf152465c77a9c2de48a6f4ef23c8c3d83.zip |
media: replace strncpy() by strscpy()
The strncpy() function is being deprecated upstream. Replace
it by the safer strscpy().
While here, replace a few occurences of strlcpy() that were
recently added to also use strscpy().
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/sunxi/sun6i-csi')
-rw-r--r-- | drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c index 1fd16861f111..f0dfe68486d1 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c @@ -412,7 +412,7 @@ static int vidioc_enum_input(struct file *file, void *fh, if (inp->index != 0) return -EINVAL; - strlcpy(inp->name, "camera", sizeof(inp->name)); + strscpy(inp->name, "camera", sizeof(inp->name)); inp->type = V4L2_INPUT_TYPE_CAMERA; return 0; @@ -644,7 +644,7 @@ int sun6i_video_init(struct sun6i_video *video, struct sun6i_csi *csi, } /* Register video device */ - strlcpy(vdev->name, name, sizeof(vdev->name)); + strscpy(vdev->name, name, sizeof(vdev->name)); vdev->release = video_device_release_empty; vdev->fops = &sun6i_video_fops; vdev->ioctl_ops = &sun6i_video_ioctl_ops; |