Re: [PATCH 5/9] media: airspy: set lock before calling vb2_queue_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hans,

Thank you for the patch.

On Mon, Sep 02, 2024 at 04:04:51PM +0200, Hans Verkuil wrote:
> 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@xxxxxxxxx>

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx>

> ---
>  drivers/media/usb/airspy/airspy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/usb/airspy/airspy.c b/drivers/media/usb/airspy/airspy.c
> index e24e655fb1db..3e2a3099a8fe 100644
> --- a/drivers/media/usb/airspy/airspy.c
> +++ b/drivers/media/usb/airspy/airspy.c
> @@ -1017,6 +1017,7 @@ static int airspy_probe(struct usb_interface *intf,
>  	s->vb_queue.ops = &airspy_vb2_ops;
>  	s->vb_queue.mem_ops = &vb2_vmalloc_memops;
>  	s->vb_queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> +	s->vb_queue.lock = &s->vb_queue_lock;
>  	ret = vb2_queue_init(&s->vb_queue);
>  	if (ret) {
>  		dev_err(s->dev, "Could not initialize vb2 queue\n");
> @@ -1026,7 +1027,6 @@ static int airspy_probe(struct usb_interface *intf,
>  	/* Init video_device structure */
>  	s->vdev = airspy_template;
>  	s->vdev.queue = &s->vb_queue;
> -	s->vdev.queue->lock = &s->vb_queue_lock;
>  	video_set_drvdata(&s->vdev, s);
>  
>  	/* Register the v4l2_device structure */

-- 
Regards,

Laurent Pinchart




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux