diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-06-04 13:19:55 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-05 14:47:44 +0200 |
commit | 1397e3ec0cff0110a1d9c1b1d5fd2c79bfe72fc9 (patch) | |
tree | d374788deb23ab8f9bc4c5aab190a00c5606ecb8 /drivers/usb/gadget/function/f_uvc.c | |
parent | media: rtl2832_sdr: set device_caps in struct video_device (diff) | |
download | linux-1397e3ec0cff0110a1d9c1b1d5fd2c79bfe72fc9.tar.xz linux-1397e3ec0cff0110a1d9c1b1d5fd2c79bfe72fc9.zip |
media: usb/gadget/f_uvc: 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
this UVC gadget driver.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/usb/gadget/function/f_uvc.c')
-rw-r--r-- | drivers/usb/gadget/function/f_uvc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c index 8c99392df593..fb0a892687c0 100644 --- a/drivers/usb/gadget/function/f_uvc.c +++ b/drivers/usb/gadget/function/f_uvc.c @@ -423,6 +423,7 @@ uvc_register_video(struct uvc_device *uvc) uvc->vdev.release = video_device_release_empty; uvc->vdev.vfl_dir = VFL_DIR_TX; uvc->vdev.lock = &uvc->video.mutex; + uvc->vdev.device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; strlcpy(uvc->vdev.name, cdev->gadget->name, sizeof(uvc->vdev.name)); video_set_drvdata(&uvc->vdev, uvc); |