diff mbox series

[21/55] media: i2c: video-i2c: Stop abusing of min_buffers_needed field

Message ID 20231127165454.166373-22-benjamin.gaignard@collabora.com
State New
Headers show
Series Clean up queue_setup()/min_buffers_needed (ab)use | expand

Commit Message

Benjamin Gaignard Nov. 27, 2023, 4:54 p.m. UTC
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
video-i2c driver doesn't use DMA engine and just want to specify
the minimum number of buffers to allocate when calling VIDIOC_REQBUFS.
That 'min_reqbufs_allocation' field purpose so use it.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
 drivers/media/i2c/video-i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c
index ebf2ac98a068..ec20849cd306 100644
--- a/drivers/media/i2c/video-i2c.c
+++ b/drivers/media/i2c/video-i2c.c
@@ -795,7 +795,7 @@  static int video_i2c_probe(struct i2c_client *client)
 	queue->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
 	queue->drv_priv = data;
 	queue->buf_struct_size = sizeof(struct video_i2c_buffer);
-	queue->min_buffers_needed = 1;
+	queue->min_reqbufs_allocation = 1;
 	queue->ops = &video_i2c_video_qops;
 	queue->mem_ops = &vb2_vmalloc_memops;