diff mbox series

[RESEND] staging: bcm2835-camera: drop vb2_ops_wait_prepare/finish

Message ID f01dc977-bc4a-46f5-abd7-35089c8f2031@xs4all.nl
State New
Headers show
Series [RESEND] staging: bcm2835-camera: drop vb2_ops_wait_prepare/finish | expand

Commit Message

Hans Verkuil Jan. 28, 2025, 3:16 p.m. UTC
Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish
are NULL") it is no longer needed to set the wait_prepare/finish
vb2_ops callbacks as long as the lock field in vb2_queue is set.

Since the vb2_ops_wait_prepare/finish callbacks already rely on that field,
we can safely drop these callbacks.

This simplifies the code and this is a step towards the goal of deleting
these callbacks.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
---
Resend, adding missing CC to linux-media. No other changes.
---
 drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Laurent Pinchart Jan. 28, 2025, 3:31 p.m. UTC | #1
Hi Hans,

Thank you for the patch.

On Tue, Jan 28, 2025 at 04:16:27PM +0100, Hans Verkuil wrote:
> Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish
> are NULL") it is no longer needed to set the wait_prepare/finish
> vb2_ops callbacks as long as the lock field in vb2_queue is set.
> 
> Since the vb2_ops_wait_prepare/finish callbacks already rely on that field,
> we can safely drop these callbacks.
> 
> This simplifies the code and this is a step towards the goal of deleting
> these callbacks.
> 
> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Note that once we merge a driver for the ISP, this driver will likely be
removed.

> ---
> Resend, adding missing CC to linux-media. No other changes.
> ---
>  drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> index deec33f63bcf..b839b50ac26a 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> @@ -658,8 +658,6 @@ static const struct vb2_ops bcm2835_mmal_video_qops = {
>  	.buf_queue = buffer_queue,
>  	.start_streaming = start_streaming,
>  	.stop_streaming = stop_streaming,
> -	.wait_prepare = vb2_ops_wait_prepare,
> -	.wait_finish = vb2_ops_wait_finish,
>  };
> 
>  /* ------------------------------------------------------------------
> -- 
> 2.45.2
>
Hans Verkuil Jan. 28, 2025, 3:35 p.m. UTC | #2
On 28/01/2025 16:31, Laurent Pinchart wrote:
> Hi Hans,
> 
> Thank you for the patch.
> 
> On Tue, Jan 28, 2025 at 04:16:27PM +0100, Hans Verkuil wrote:
>> Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish
>> are NULL") it is no longer needed to set the wait_prepare/finish
>> vb2_ops callbacks as long as the lock field in vb2_queue is set.
>>
>> Since the vb2_ops_wait_prepare/finish callbacks already rely on that field,
>> we can safely drop these callbacks.
>>
>> This simplifies the code and this is a step towards the goal of deleting
>> these callbacks.
>>
>> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> Note that once we merge a driver for the ISP, this driver will likely be
> removed.

I know, but my goal is to remove vb2_ops_wait_prepare/finish, so
any driver still using it needs to be modified.

Regards,

	Hans

> 
>> ---
>> Resend, adding missing CC to linux-media. No other changes.
>> ---
>>  drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
>> index deec33f63bcf..b839b50ac26a 100644
>> --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
>> +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
>> @@ -658,8 +658,6 @@ static const struct vb2_ops bcm2835_mmal_video_qops = {
>>  	.buf_queue = buffer_queue,
>>  	.start_streaming = start_streaming,
>>  	.stop_streaming = stop_streaming,
>> -	.wait_prepare = vb2_ops_wait_prepare,
>> -	.wait_finish = vb2_ops_wait_finish,
>>  };
>>
>>  /* ------------------------------------------------------------------
>> -- 
>> 2.45.2
>>
>
diff mbox series

Patch

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index deec33f63bcf..b839b50ac26a 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -658,8 +658,6 @@  static const struct vb2_ops bcm2835_mmal_video_qops = {
 	.buf_queue = buffer_queue,
 	.start_streaming = start_streaming,
 	.stop_streaming = stop_streaming,
-	.wait_prepare = vb2_ops_wait_prepare,
-	.wait_finish = vb2_ops_wait_finish,
 };

 /* ------------------------------------------------------------------