hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/media/usb/uvc/uvc_metadata.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * uvc_metadata.c -- USB Video Class driver - Metadata handling
34 *
45 * Copyright (C) 2016
56 * Guennadi Liakhovetski (guennadi.liakhovetski@intel.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 as published by
9
- * the Free Software Foundation; either version 2 of the License, or
10
- * (at your option) any later version.
117 */
128
139 #include <linux/kernel.h>
....@@ -33,8 +29,8 @@
3329 struct uvc_streaming *stream = video_get_drvdata(vfh->vdev);
3430 struct uvc_video_chain *chain = stream->chain;
3531
36
- strlcpy(cap->driver, "uvcvideo", sizeof(cap->driver));
37
- strlcpy(cap->card, vfh->vdev->name, sizeof(cap->card));
32
+ strscpy(cap->driver, "uvcvideo", sizeof(cap->driver));
33
+ strscpy(cap->card, vfh->vdev->name, sizeof(cap->card));
3834 usb_make_path(stream->dev->udev, cap->bus_info, sizeof(cap->bus_info));
3935 cap->capabilities = V4L2_CAP_DEVICE_CAPS | V4L2_CAP_STREAMING
4036 | chain->caps;
....@@ -55,7 +51,7 @@
5551 memset(fmt, 0, sizeof(*fmt));
5652
5753 fmt->dataformat = stream->meta.format;
58
- fmt->buffersize = UVC_METATADA_BUF_SIZE;
54
+ fmt->buffersize = UVC_METADATA_BUF_SIZE;
5955
6056 return 0;
6157 }
....@@ -76,7 +72,7 @@
7672
7773 fmt->dataformat = fmeta == dev->info->meta_format
7874 ? fmeta : V4L2_META_FMT_UVC;
79
- fmt->buffersize = UVC_METATADA_BUF_SIZE;
75
+ fmt->buffersize = UVC_METADATA_BUF_SIZE;
8076
8177 return 0;
8278 }