aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2018-09-13 10:51:51 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-24 09:51:37 -0400
commit515c5a7333be87a7d01ab267d94626a454a7e794 (patch)
treee968c18f6e43637ad96bb780f59b344d6bbf24a9 /include/media
parentmedia: v4l2-ctrls.c: initialize an error return code with zero (diff)
downloadlinux-dev-515c5a7333be87a7d01ab267d94626a454a7e794.tar.xz
linux-dev-515c5a7333be87a7d01ab267d94626a454a7e794.zip
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 'include/media')
-rw-r--r--include/media/videobuf2-core.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index 6c76b9802589..e86981d615ae 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -1191,10 +1191,10 @@ int vb2_verify_memory_type(struct vb2_queue *q,
bool vb2_request_object_is_buffer(struct media_request_object *obj);
/**
- * vb2_request_has_buffers() - return true if the request contains buffers
+ * vb2_request_buffer_cnt() - return the number of buffers in the request
*
* @req: the request.
*/
-bool vb2_request_has_buffers(struct media_request *req);
+unsigned int vb2_request_buffer_cnt(struct media_request *req);
#endif /* _MEDIA_VIDEOBUF2_CORE_H */