Commit f1bd5eae authored by Ricardo Ribalda Delgado's avatar Ricardo Ribalda Delgado Committed by Mauro Carvalho Chehab

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: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarRicardo Ribalda Delgado <ribalda@kernel.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 3b98a21a
...@@ -56,6 +56,7 @@ struct poll_table_struct; ...@@ -56,6 +56,7 @@ struct poll_table_struct;
* @p_hevc_slice_params: Pointer to an HEVC slice parameters structure. * @p_hevc_slice_params: Pointer to an HEVC slice parameters structure.
* @p_area: Pointer to an area. * @p_area: Pointer to an area.
* @p: Pointer to a compound value. * @p: Pointer to a compound value.
* @p_const: Pointer to a constant compound value.
*/ */
union v4l2_ctrl_ptr { union v4l2_ctrl_ptr {
s32 *p_s32; s32 *p_s32;
...@@ -78,6 +79,7 @@ union v4l2_ctrl_ptr { ...@@ -78,6 +79,7 @@ union v4l2_ctrl_ptr {
struct v4l2_ctrl_hevc_slice_params *p_hevc_slice_params; struct v4l2_ctrl_hevc_slice_params *p_hevc_slice_params;
struct v4l2_area *p_area; struct v4l2_area *p_area;
void *p; void *p;
const void *p_const;
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment