diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2017-05-26 05:21:37 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-06-07 08:38:12 -0300 |
commit | cc0140e2a04513ccdd950d939729e557d23cc910 (patch) | |
tree | 5425f756de737c8d5e597873a783bc2403dd1667 /include/media | |
parent | ec62c9a54cc28dd20dfb08b4663d021028b1a97e (diff) |
[media] v4l2-ctrls.c: Implement unlocked variant of v4l2_ctrl_handler_setup()
Sometimes the caller is already holding the control handler mutex and
using it to serialise something. Provide an unlocked variant of the same
function to be used in those cases.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/v4l2-ctrls.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h index bee1404391dd..2d2aed56922f 100644 --- a/include/media/v4l2-ctrls.h +++ b/include/media/v4l2-ctrls.h @@ -458,6 +458,19 @@ static inline void v4l2_ctrl_unlock(struct v4l2_ctrl *ctrl) } /** + * __v4l2_ctrl_handler_setup() - Call the s_ctrl op for all controls belonging + * to the handler to initialize the hardware to the current control values. The + * caller is responsible for acquiring the control handler mutex on behalf of + * __v4l2_ctrl_handler_setup(). + * @hdl: The control handler. + * + * Button controls will be skipped, as are read-only controls. + * + * If @hdl == NULL, then this just returns 0. + */ +int __v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler *hdl); + +/** * v4l2_ctrl_handler_setup() - Call the s_ctrl op for all controls belonging * to the handler to initialize the hardware to the current control values. * @hdl: The control handler. |