Skip to content

Commit b36c41c

Browse files
Hans Verkuilmchehab
authored andcommitted
media: atomisp: 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 <[email protected]> Link: https://lore.kernel.org/r/90b8e7a40c3ed306cbeb96c2f4dad97eb7e53bfd.1725285495.git.hverkuil-cisco@xs4all.nl Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 92eb522 commit b36c41c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/staging/media/atomisp/pci/atomisp_subdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,12 +797,12 @@ static int atomisp_init_subdev_pipe(struct atomisp_sub_device *asd,
797797
pipe->vb_queue.ops = &atomisp_vb2_ops;
798798
pipe->vb_queue.mem_ops = &vb2_vmalloc_memops;
799799
pipe->vb_queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
800+
pipe->vb_queue.lock = &pipe->vb_queue_mutex;
800801
ret = vb2_queue_init(&pipe->vb_queue);
801802
if (ret)
802803
return ret;
803804

804805
pipe->vdev.queue = &pipe->vb_queue;
805-
pipe->vdev.queue->lock = &pipe->vb_queue_mutex;
806806

807807
INIT_LIST_HEAD(&pipe->buffers_in_css);
808808
INIT_LIST_HEAD(&pipe->activeq);

0 commit comments

Comments
 (0)