summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/msi2500
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2024-09-02 16:04:49 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2024-10-12 15:53:52 +0200
commitfee248fb86ae229b82dee5c4764681078f0668c5 (patch)
treeea1ea1152be51f2cd28f19e23c2cfcb957f0c5da /drivers/media/usb/msi2500
parentmedia: pwc: set lock before calling vb2_queue_init() (diff)
downloadlinux-fee248fb86ae229b82dee5c4764681078f0668c5.tar.xz
linux-fee248fb86ae229b82dee5c4764681078f0668c5.zip
media: msi2500: set lock before calling vb2_queue_init()
The vb2_queue_init() will expect the vb2_queue lock pointer to be set in the future. So for those drivers that set the lock later, move it up to before the vb2_queue_init() call. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/usb/msi2500')
-rw-r--r--drivers/media/usb/msi2500/msi2500.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/msi2500/msi2500.c b/drivers/media/usb/msi2500/msi2500.c
index 5138486abfa0..c42fad1e3204 100644
--- a/drivers/media/usb/msi2500/msi2500.c
+++ b/drivers/media/usb/msi2500/msi2500.c
@@ -1199,6 +1199,7 @@ static int msi2500_probe(struct usb_interface *intf,
dev->vb_queue.ops = &msi2500_vb2_ops;
dev->vb_queue.mem_ops = &vb2_vmalloc_memops;
dev->vb_queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
+ dev->vb_queue.lock = &dev->vb_queue_lock;
ret = vb2_queue_init(&dev->vb_queue);
if (ret) {
dev_err(dev->dev, "Could not initialize vb2 queue\n");
@@ -1208,7 +1209,6 @@ static int msi2500_probe(struct usb_interface *intf,
/* Init video_device structure */
dev->vdev = msi2500_template;
dev->vdev.queue = &dev->vb_queue;
- dev->vdev.queue->lock = &dev->vb_queue_lock;
video_set_drvdata(&dev->vdev, dev);
/* Register the v4l2_device structure */