summaryrefslogtreecommitdiff
path: root/include/media/v4l2-ctrls.h
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2022-07-11 12:21:08 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-08-19 13:47:00 +0200
commit7392d87a9febb5f46f28d4704eb5636c5e22cdeb (patch)
tree983a759864b7d861687870a9400d59c9428d4e73 /include/media/v4l2-ctrls.h
parent5f2c5c69a61dc5411d436c1a422f8a1ee195a924 (diff)
media: v4l2-ctrls: alloc arrays in ctrl_ref
Also allocate space for arrays in struct ctrl_ref. This is in preparation for allowing to change the array size from a driver. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'include/media/v4l2-ctrls.h')
-rw-r--r--include/media/v4l2-ctrls.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
index 5ddd506ae7b9..c7a082c319d4 100644
--- a/include/media/v4l2-ctrls.h
+++ b/include/media/v4l2-ctrls.h
@@ -318,15 +318,15 @@ struct v4l2_ctrl {
* from a cluster with multiple controls twice (when the first
* control of a cluster is applied, they all are).
* @p_req_valid: If set, then p_req contains the control value for the request.
- * @p_req_dyn_enomem: If set, then p_req is invalid since allocating space for
- * a dynamic array failed. Attempting to read this value shall
- * result in ENOMEM. Only valid if ctrl->is_dyn_array is true.
- * @p_req_dyn_alloc_elems: The number of elements allocated for the dynamic
- * array. Only valid if @p_req_valid and ctrl->is_dyn_array are
+ * @p_req_array_enomem: If set, then p_req is invalid since allocating space for
+ * an array failed. Attempting to read this value shall
+ * result in ENOMEM. Only valid if ctrl->is_array is true.
+ * @p_req_array_alloc_elems: The number of elements allocated for the
+ * array. Only valid if @p_req_valid and ctrl->is_array are
* true.
* @p_req_elems: The number of elements in @p_req. This is the same as
* ctrl->elems, except for dynamic arrays. In that case it is in
- * the range of 1 to @p_req_dyn_alloc_elems. Only valid if
+ * the range of 1 to @p_req_array_alloc_elems. Only valid if
* @p_req_valid is true.
* @p_req: If the control handler containing this control reference
* is bound to a media request, then this points to the
@@ -348,8 +348,8 @@ struct v4l2_ctrl_ref {
bool from_other_dev;
bool req_done;
bool p_req_valid;
- bool p_req_dyn_enomem;
- u32 p_req_dyn_alloc_elems;
+ bool p_req_array_enomem;
+ u32 p_req_array_alloc_elems;
u32 p_req_elems;
union v4l2_ctrl_ptr p_req;
};