summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@collabora.com>2023-11-09 17:34:43 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-11-23 12:26:47 +0100
commitefd7ae5d95caac9ece5b2dfac0d90a574111d3bf (patch)
treeac3283be3fca46c16cbc4aaf927f11f2ec3ea571
parentda53f4e6fa861bc8d454db3551f807b4a86bbb02 (diff)
downloadlinux-stable-efd7ae5d95caac9ece5b2dfac0d90a574111d3bf.tar.gz
linux-stable-efd7ae5d95caac9ece5b2dfac0d90a574111d3bf.tar.bz2
linux-stable-efd7ae5d95caac9ece5b2dfac0d90a574111d3bf.zip
media: coda: 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: Andrzej Pietrasiewicz <andrzej.p@collabora.com> CC: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-rw-r--r--drivers/media/platform/chips-media/coda/coda-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/chips-media/coda/coda-common.c b/drivers/media/platform/chips-media/coda/coda-common.c
index cc4892129aaf..f1d85758f6dd 100644
--- a/drivers/media/platform/chips-media/coda/coda-common.c
+++ b/drivers/media/platform/chips-media/coda/coda-common.c
@@ -794,7 +794,7 @@ static int coda_s_fmt(struct coda_ctx *ctx, struct v4l2_format *f,
if (vb2_is_busy(vq)) {
v4l2_err(&ctx->dev->v4l2_dev, "%s: %s queue busy: %d\n",
- __func__, v4l2_type_names[f->type], vq->num_buffers);
+ __func__, v4l2_type_names[f->type], vb2_get_num_buffers(vq));
return -EBUSY;
}