]> git.baikalelectronics.ru Git - kernel.git/commit
media: v4l2-core: Implement v4l2_ctrl_new_std_compound
authorRicardo Ribalda Delgado <ribalda@kernel.org>
Mon, 7 Oct 2019 15:06:29 +0000 (12:06 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 10 Oct 2019 14:34:58 +0000 (11:34 -0300)
commit7abc34c8248827bbb23ce5e6a6b1ff46308acea8
tree89cba39c7977ef44fca3f18a831349ed920a2d33
parentab10b7f77620d07a3717e18ab0a48e084f34c06b
media: v4l2-core: Implement v4l2_ctrl_new_std_compound

Currently compound controls do not have a simple way of initializing its
values. This results in ofuscated code with type_ops init.

This patch introduces a new field on the control with the default value
for the compound control that can be set with the brand new
v4l2_ctrl_new_std_compound function

Suggested-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Ricardo Ribalda Delgado <ribalda@kernel.org>
[hverkuil@xs4all.nl: fix checkpatch warning]
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/v4l2-core/v4l2-ctrls.c
include/media/v4l2-ctrls.h