UPSTREAM: 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>

(cherry picked from commit b9b82d3d0dbc45ee6b4817c7a7275a65152301f5)
Bug: 242344221
Bug: 325993121
Change-Id: Ic4af4e164a2bb01578b10dd3c478a142c244c9ad
Signed-off-by: Avichal Rakesh <arakesh@google.com>
Signed-off-by: Luca Stefani <luca@osomprivacy.com>
This commit is contained in:
Michael Grzeschik
2021-06-28 17:53:09 +02:00
committed by Luca Stefani
parent 44817294cf
commit 2a717853b3

View File

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