summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/hdpvr
diff options
context:
space:
mode:
authorHans Verkuil2019-06-04 13:19:53 +0200
committerMauro Carvalho Chehab2019-06-05 14:24:49 +0200
commit8c3854d03bd7b86e8f36e6d9b07b4a6bc20deccd (patch)
tree61c61149adad3b110f65dd27341053dd32214856 /drivers/media/usb/hdpvr
parentmedia: media/radio: set device_caps in struct video_device (diff)
downloadkernel-qcow2-linux-8c3854d03bd7b86e8f36e6d9b07b4a6bc20deccd.tar.gz
kernel-qcow2-linux-8c3854d03bd7b86e8f36e6d9b07b4a6bc20deccd.tar.xz
kernel-qcow2-linux-8c3854d03bd7b86e8f36e6d9b07b4a6bc20deccd.zip
media: media/usb: set device_caps in struct video_device
Instead of filling in the struct v4l2_capability device_caps field, fill in the struct video_device device_caps field. That way the V4L2 core knows what the capabilities of the video device are. But this only really works if all drivers use this, so convert all usb drivers in this patch. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/usb/hdpvr')
-rw-r--r--drivers/media/usb/hdpvr/hdpvr-video.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c
index 3804aa3fb50f..a675506e8939 100644
--- a/drivers/media/usb/hdpvr/hdpvr-video.c
+++ b/drivers/media/usb/hdpvr/hdpvr-video.c
@@ -581,9 +581,6 @@ static int vidioc_querycap(struct file *file, void *priv,
strscpy(cap->driver, "hdpvr", sizeof(cap->driver));
strscpy(cap->card, "Hauppauge HD PVR", sizeof(cap->card));
usb_make_path(dev->udev, cap->bus_info, sizeof(cap->bus_info));
- cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_AUDIO |
- V4L2_CAP_READWRITE;
- cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
return 0;
}
@@ -1154,6 +1151,8 @@ static const struct video_device hdpvr_video_template = {
.release = hdpvr_device_release,
.ioctl_ops = &hdpvr_ioctl_ops,
.tvnorms = V4L2_STD_ALL,
+ .device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_AUDIO |
+ V4L2_CAP_READWRITE,
};
static const struct v4l2_ctrl_ops hdpvr_ctrl_ops = {