diff options
author | Benjamin Gaignard <benjamin.gaignard@collabora.com> | 2023-11-09 19:34:33 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-11-23 14:07:18 +0300 |
commit | 53963fb12fd43176dff4b33d937fb7575b0bf4fb (patch) | |
tree | e4ad57c7ad9f367740b3c9a8913f3871bb5c9cda | |
parent | 202de2b5d1b6ba12ab95fe3d6ea2a428888e59b4 (diff) | |
download | linux-53963fb12fd43176dff4b33d937fb7575b0bf4fb.tar.xz |
media: atomisp: Stop direct calls to queue num_buffers field
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly.
This allows us to change how the number of buffers is computed in the
future.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
CC: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c index a8a964b2f1a8..09c0091b920f 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c +++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c @@ -1028,7 +1028,7 @@ static int atomisp_qbuf_wrapper(struct file *file, void *fh, struct v4l2_buffer struct atomisp_device *isp = video_get_drvdata(vdev); struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev); - if (buf->index >= vdev->queue->num_buffers) + if (buf->index >= vb2_get_num_buffers(vdev->queue)) return -EINVAL; if (buf->reserved2 & ATOMISP_BUFFER_HAS_PER_FRAME_SETTING) { |