summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2024-09-02 16:04:52 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2024-10-12 15:53:55 +0200
commit922b739445f39b31e243f517fd09630f5a406f0a (patch)
tree72ef27d52c129431cbf561148cc63e6a4142582d /drivers
parent8d04fcc76f82e7025444b1d79d5a00dd1d2388b9 (diff)
downloadlinux-stable-922b739445f39b31e243f517fd09630f5a406f0a.tar.gz
linux-stable-922b739445f39b31e243f517fd09630f5a406f0a.tar.bz2
linux-stable-922b739445f39b31e243f517fd09630f5a406f0a.zip
media: rcar_drif.c: 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> Cc: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Cc: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/renesas/rcar_drif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/renesas/rcar_drif.c b/drivers/media/platform/renesas/rcar_drif.c
index f21d05054341..5d3109940ded 100644
--- a/drivers/media/platform/renesas/rcar_drif.c
+++ b/drivers/media/platform/renesas/rcar_drif.c
@@ -1071,7 +1071,6 @@ static int rcar_drif_sdr_register(struct rcar_drif_sdr *sdr)
sdr->vdev->release = video_device_release;
sdr->vdev->lock = &sdr->v4l2_mutex;
sdr->vdev->queue = &sdr->vb_queue;
- sdr->vdev->queue->lock = &sdr->vb_queue_mutex;
sdr->vdev->ctrl_handler = &sdr->ctrl_hdl;
sdr->vdev->v4l2_dev = &sdr->v4l2_dev;
sdr->vdev->device_caps = V4L2_CAP_SDR_CAPTURE | V4L2_CAP_TUNER |
@@ -1316,6 +1315,7 @@ static int rcar_drif_sdr_probe(struct rcar_drif_sdr *sdr)
sdr->vb_queue.ops = &rcar_drif_vb2_ops;
sdr->vb_queue.mem_ops = &vb2_vmalloc_memops;
sdr->vb_queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
+ sdr->vb_queue.lock = &sdr->vb_queue_mutex;
/* Init videobuf2 queue */
ret = vb2_queue_init(&sdr->vb_queue);