aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/tw68
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2019-06-17 05:36:16 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-06-24 14:57:12 -0400
commit2161536516edcc0be31109eb1284939119e7ba6d (patch)
tree2117cbdb255958f4a531a736b1781498e103937e /drivers/media/pci/tw68
parent374d62e7aa50f66c1a4316be9221df4d0f38addd (diff)
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/tw68')
-rw-r--r--drivers/media/pci/tw68/tw68-video.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/pci/tw68/tw68-video.c b/drivers/media/pci/tw68/tw68-video.c
index 5b469cf578f5..8e0952d65ad4 100644
--- a/drivers/media/pci/tw68/tw68-video.c
+++ b/drivers/media/pci/tw68/tw68-video.c
@@ -729,12 +729,6 @@ static int tw68_querycap(struct file *file, void *priv,
729 strscpy(cap->card, "Techwell Capture Card", 729 strscpy(cap->card, "Techwell Capture Card",
730 sizeof(cap->card)); 730 sizeof(cap->card));
731 sprintf(cap->bus_info, "PCI:%s", pci_name(dev->pci)); 731 sprintf(cap->bus_info, "PCI:%s", pci_name(dev->pci));
732 cap->device_caps =
733 V4L2_CAP_VIDEO_CAPTURE |
734 V4L2_CAP_READWRITE |
735 V4L2_CAP_STREAMING;
736
737 cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
738 return 0; 732 return 0;
739} 733}
740 734
@@ -913,6 +907,8 @@ static const struct video_device tw68_video_template = {
913 .ioctl_ops = &video_ioctl_ops, 907 .ioctl_ops = &video_ioctl_ops,
914 .release = video_device_release_empty, 908 .release = video_device_release_empty,
915 .tvnorms = TW68_NORMS, 909 .tvnorms = TW68_NORMS,
910 .device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE |
911 V4L2_CAP_STREAMING,
916}; 912};
917 913
918/* ------------------------------------------------------------------ */ 914/* ------------------------------------------------------------------ */