| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * uvc_metadata.c -- USB Video Class driver - Metadata handling |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2016 |
|---|
| 5 | 6 | * 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. |
|---|
| 11 | 7 | */ |
|---|
| 12 | 8 | |
|---|
| 13 | 9 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 33 | 29 | struct uvc_streaming *stream = video_get_drvdata(vfh->vdev); |
|---|
| 34 | 30 | struct uvc_video_chain *chain = stream->chain; |
|---|
| 35 | 31 | |
|---|
| 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)); |
|---|
| 38 | 34 | usb_make_path(stream->dev->udev, cap->bus_info, sizeof(cap->bus_info)); |
|---|
| 39 | 35 | cap->capabilities = V4L2_CAP_DEVICE_CAPS | V4L2_CAP_STREAMING |
|---|
| 40 | 36 | | chain->caps; |
|---|
| .. | .. |
|---|
| 55 | 51 | memset(fmt, 0, sizeof(*fmt)); |
|---|
| 56 | 52 | |
|---|
| 57 | 53 | fmt->dataformat = stream->meta.format; |
|---|
| 58 | | - fmt->buffersize = UVC_METATADA_BUF_SIZE; |
|---|
| 54 | + fmt->buffersize = UVC_METADATA_BUF_SIZE; |
|---|
| 59 | 55 | |
|---|
| 60 | 56 | return 0; |
|---|
| 61 | 57 | } |
|---|
| .. | .. |
|---|
| 76 | 72 | |
|---|
| 77 | 73 | fmt->dataformat = fmeta == dev->info->meta_format |
|---|
| 78 | 74 | ? fmeta : V4L2_META_FMT_UVC; |
|---|
| 79 | | - fmt->buffersize = UVC_METATADA_BUF_SIZE; |
|---|
| 75 | + fmt->buffersize = UVC_METADATA_BUF_SIZE; |
|---|
| 80 | 76 | |
|---|
| 81 | 77 | return 0; |
|---|
| 82 | 78 | } |
|---|