diff options
author | Benjamin Gaignard <benjamin.gaignard@collabora.com> | 2023-11-09 19:34:43 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-11-23 14:26:47 +0300 |
commit | efd7ae5d95caac9ece5b2dfac0d90a574111d3bf (patch) | |
tree | ac3283be3fca46c16cbc4aaf927f11f2ec3ea571 /drivers/media/platform/chips-media/coda/coda-common.c | |
parent | da53f4e6fa861bc8d454db3551f807b4a86bbb02 (diff) | |
download | linux-efd7ae5d95caac9ece5b2dfac0d90a574111d3bf.tar.xz |
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>
Diffstat (limited to 'drivers/media/platform/chips-media/coda/coda-common.c')
-rw-r--r-- | drivers/media/platform/chips-media/coda/coda-common.c | 2 |
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; } |