diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2019-06-17 12:36:16 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-24 21:57:12 +0300 |
commit | 2161536516edcc0be31109eb1284939119e7ba6d (patch) | |
tree | 2117cbdb255958f4a531a736b1781498e103937e /drivers/media/pci/sta2x11 | |
parent | 374d62e7aa50f66c1a4316be9221df4d0f38addd (diff) | |
download | linux-2161536516edcc0be31109eb1284939119e7ba6d.tar.xz |
media: media/pci: 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 pci drivers in this patch.
Tested with cx88-blackbird and ivtv PVR-350.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/pci/sta2x11')
-rw-r--r-- | drivers/media/pci/sta2x11/sta2x11_vip.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index 9de5b2a35519..e52e29814378 100644 --- a/drivers/media/pci/sta2x11/sta2x11_vip.c +++ b/drivers/media/pci/sta2x11/sta2x11_vip.c @@ -407,10 +407,6 @@ static int vidioc_querycap(struct file *file, void *priv, strscpy(cap->card, KBUILD_MODNAME, sizeof(cap->card)); snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s", pci_name(vip->pdev)); - cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | - V4L2_CAP_STREAMING; - cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; - return 0; } @@ -759,6 +755,8 @@ static const struct video_device video_dev_template = { .fops = &vip_fops, .ioctl_ops = &vip_ioctl_ops, .tvnorms = V4L2_STD_ALL, + .device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | + V4L2_CAP_STREAMING, }; /** |