* [PATCHv2] staging/most/video: set device_caps in struct video_device
@ 2019-06-26 8:30 Hans Verkuil
0 siblings, 0 replies; only message in thread
From: Hans Verkuil @ 2019-06-26 8:30 UTC (permalink / raw)
To: Andrey Shvetsov; +Cc: Linux Media Mailing List, Greg Kroah-Hartman
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.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
Hi Andrey,
I noticed this new staging V4L2 driver. FYI, please CC any future patches to
this driver to the linux-media@vger.kernel.org mailinglist as well so we can
review it. I'll post a review of this driver later today as well. In the
meantime, I'd like to get this patch in since during the upcoming 5.4 cycle
we will require that the device_caps field of struct video_device is set
correctly.
Regards,
Hans
Changes since v1:
- drop V4L2_CAP_TUNER since this device has no tuner.
---
diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
index adca250062e1..7d12ab6c60a1 100644
--- a/drivers/staging/most/video/video.c
+++ b/drivers/staging/most/video/video.c
@@ -250,11 +250,6 @@ static int vidioc_querycap(struct file *file, void *priv,
strlcpy(cap->card, "MOST", sizeof(cap->card));
snprintf(cap->bus_info, sizeof(cap->bus_info),
"%s", mdev->iface->description);
-
- cap->capabilities =
- V4L2_CAP_READWRITE |
- V4L2_CAP_TUNER |
- V4L2_CAP_VIDEO_CAPTURE;
return 0;
}
@@ -366,6 +361,7 @@ static const struct video_device comp_videodev_template = {
.release = video_device_release,
.ioctl_ops = &video_ioctl_ops,
.tvnorms = V4L2_STD_UNKNOWN,
+ .device_caps = V4L2_CAP_READWRITE | V4L2_CAP_VIDEO_CAPTURE,
};
/**************************************************************************/
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-26 8:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 8:30 [PATCHv2] staging/most/video: set device_caps in struct video_device Hans Verkuil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).