summaryrefslogtreecommitdiff
path: root/include/media/v4l2-ctrls.h
diff options
context:
space:
mode:
authorRicardo Ribalda Delgado <ribalda@kernel.org>2019-11-04 14:09:19 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2019-11-08 07:40:49 +0100
commitf1bd5eae7de76ef8eabc9e393f5a8718d8f25d2a (patch)
tree3701702d3eff9b5a0cd4b15d4c53adeb83fc5a03 /include/media/v4l2-ctrls.h
parent3b98a21a3202aeb9a47c0b57cab3d3ed420c1e05 (diff)
media: v4l2_ctrl: Add const pointer to ctrl_ptr
This pointer is used to point to data that is constant. Thanks to this we can avoid a lot of casting and we make more clear when the data is constant or variable. Suggested-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Ricardo Ribalda Delgado <ribalda@kernel.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'include/media/v4l2-ctrls.h')
-rw-r--r--include/media/v4l2-ctrls.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
index 78a97b10c89e..7db9e719a583 100644
--- a/include/media/v4l2-ctrls.h
+++ b/include/media/v4l2-ctrls.h
@@ -56,6 +56,7 @@ struct poll_table_struct;
* @p_hevc_slice_params: Pointer to an HEVC slice parameters structure.
* @p_area: Pointer to an area.
* @p: Pointer to a compound value.
+ * @p_const: Pointer to a constant compound value.
*/
union v4l2_ctrl_ptr {
s32 *p_s32;
@@ -78,6 +79,7 @@ union v4l2_ctrl_ptr {
struct v4l2_ctrl_hevc_slice_params *p_hevc_slice_params;
struct v4l2_area *p_area;
void *p;
+ const void *p_const;
};
/**