diff mbox series

atomisp: use vb2_start_streaming_called()

Message ID bc6c24ec-72ea-64a1-9061-311cc7339827@xs4all.nl
State Accepted
Commit 5b8c1d30dc358c07aa0ef7676c2ddc3787abcf86
Headers show
Series atomisp: use vb2_start_streaming_called() | expand

Commit Message

Hans Verkuil Dec. 8, 2022, 8:12 a.m. UTC
Don't touch q->start_streaming_called directly, use the
vb2_start_streaming_called() function instead.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Hans de Goede Jan. 13, 2023, 1 p.m. UTC | #1
Hi,

On 12/8/22 09:12, Hans Verkuil wrote:
> Don't touch q->start_streaming_called directly, use the
> vb2_start_streaming_called() function instead.
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

Thank you I have added this to my list of pending atomisp
patches now.

Regards,

Hans


> ---
>  drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
> index cb01ba65c88f..4f35e8f8250a 100644
> --- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
> @@ -636,10 +636,10 @@ static int atomisp_enum_input(struct file *file, void *fh,
>  static unsigned int
>  atomisp_subdev_streaming_count(struct atomisp_sub_device *asd)
>  {
> -	return asd->video_out_preview.vb_queue.start_streaming_called
> -	       + asd->video_out_capture.vb_queue.start_streaming_called
> -	       + asd->video_out_video_capture.vb_queue.start_streaming_called
> -	       + asd->video_out_vf.vb_queue.start_streaming_called;
> +	return vb2_start_streaming_called(&asd->video_out_preview.vb_queue) +
> +	       vb2_start_streaming_called(&asd->video_out_capture.vb_queue) +
> +	       vb2_start_streaming_called(&asd->video_out_video_capture.vb_queue) +
> +	       vb2_start_streaming_called(&asd->video_out_vf.vb_queue);
>  }
> 
>  unsigned int atomisp_streaming_count(struct atomisp_device *isp)
diff mbox series

Patch

diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
index cb01ba65c88f..4f35e8f8250a 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
@@ -636,10 +636,10 @@  static int atomisp_enum_input(struct file *file, void *fh,
 static unsigned int
 atomisp_subdev_streaming_count(struct atomisp_sub_device *asd)
 {
-	return asd->video_out_preview.vb_queue.start_streaming_called
-	       + asd->video_out_capture.vb_queue.start_streaming_called
-	       + asd->video_out_video_capture.vb_queue.start_streaming_called
-	       + asd->video_out_vf.vb_queue.start_streaming_called;
+	return vb2_start_streaming_called(&asd->video_out_preview.vb_queue) +
+	       vb2_start_streaming_called(&asd->video_out_capture.vb_queue) +
+	       vb2_start_streaming_called(&asd->video_out_video_capture.vb_queue) +
+	       vb2_start_streaming_called(&asd->video_out_vf.vb_queue);
 }

 unsigned int atomisp_streaming_count(struct atomisp_device *isp)