media: media/usb: don't set description in ENUM_FMT

The V4L2 core sets the description for the driver in order to ensure
consistent naming.

So drop the strscpy of the description in drivers. Also remove any
description strings in driver-internal structures since those are
no longer needed.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
此提交包含在:
Hans Verkuil
2019-06-11 09:48:54 -04:00
提交者 Mauro Carvalho Chehab
父節點 4747bd0f41
當前提交 009cb7d579
共有 24 個檔案被更改,包括 14 行新增120 行删除

查看文件

@@ -285,33 +285,22 @@ static int vidioc_querycap(struct file *file, void *priv,
static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_fmtdesc *fmt)
{
char *desc = NULL;
switch (fmt->index) {
case 0:
fmt->pixelformat = V4L2_PIX_FMT_MJPEG;
desc = "Motion JPEG";
break;
case 1:
fmt->pixelformat = V4L2_PIX_FMT_MPEG1;
desc = "MPEG-1 ES";
break;
case 2:
fmt->pixelformat = V4L2_PIX_FMT_MPEG2;
desc = "MPEG-2 ES";
break;
case 3:
fmt->pixelformat = V4L2_PIX_FMT_MPEG4;
desc = "MPEG-4 ES";
break;
default:
return -EINVAL;
}
fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
fmt->flags = V4L2_FMT_FLAG_COMPRESSED;
strscpy(fmt->description, desc, sizeof(fmt->description));
return 0;
}