usb: gadget: uvc: set v4l2_dev->dev in f_uvc

The v4l2_dev has no corresponding device to it. We will
point it to the gadget's dev.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20210628155311.16762-4-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Michael Grzeschik 2021-06-28 17:53:09 +02:00 committed by Greg Kroah-Hartman
parent 9973772dbb
commit b9b82d3d0d
1 changed files with 1 additions and 0 deletions

View File

@ -418,6 +418,7 @@ uvc_register_video(struct uvc_device *uvc)
/* TODO reference counting. */ /* TODO reference counting. */
uvc->vdev.v4l2_dev = &uvc->v4l2_dev; uvc->vdev.v4l2_dev = &uvc->v4l2_dev;
uvc->vdev.v4l2_dev->dev = &cdev->gadget->dev;
uvc->vdev.fops = &uvc_v4l2_fops; uvc->vdev.fops = &uvc_v4l2_fops;
uvc->vdev.ioctl_ops = &uvc_v4l2_ioctl_ops; uvc->vdev.ioctl_ops = &uvc_v4l2_ioctl_ops;
uvc->vdev.release = video_device_release_empty; uvc->vdev.release = video_device_release_empty;