summaryrefslogtreecommitdiff
path: root/drivers/media/common/videobuf2/videobuf2-v4l2.c
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2018-09-13 17:51:51 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-24 16:51:37 +0300
commit515c5a7333be87a7d01ab267d94626a454a7e794 (patch)
treee968c18f6e43637ad96bb780f59b344d6bbf24a9 /drivers/media/common/videobuf2/videobuf2-v4l2.c
parent7390ba4397c1ed069de3b7f88c3f3821d648a582 (diff)
downloadlinux-515c5a7333be87a7d01ab267d94626a454a7e794.tar.xz
media: videobuf2-core: Rework and rename helper for request buffer count
The helper indicating whether buffers are associated with the request is reworked and renamed to return the number of associated buffer objects. This is useful for drivers that need to check how many buffers are in the request to validate it. Existing users of the helper don't need particular adaptation since the meaning of zero/non-zero remains consistent. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/common/videobuf2/videobuf2-v4l2.c')
-rw-r--r--drivers/media/common/videobuf2/videobuf2-v4l2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/common/videobuf2/videobuf2-v4l2.c b/drivers/media/common/videobuf2/videobuf2-v4l2.c
index 6831a2eb1859..a17033ab2c22 100644
--- a/drivers/media/common/videobuf2/videobuf2-v4l2.c
+++ b/drivers/media/common/videobuf2/videobuf2-v4l2.c
@@ -1139,7 +1139,7 @@ int vb2_request_validate(struct media_request *req)
struct media_request_object *obj;
int ret = 0;
- if (!vb2_request_has_buffers(req))
+ if (!vb2_request_buffer_cnt(req))
return -ENOENT;
list_for_each_entry(obj, &req->objects, list) {