aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/media/v4l2-ctrls.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
index c6f6b4c2c5f2..dde6fbacc271 100644
--- a/include/media/v4l2-ctrls.h
+++ b/include/media/v4l2-ctrls.h
@@ -167,7 +167,9 @@ struct v4l2_ctrl_ref {
167/** struct v4l2_ctrl_handler - The control handler keeps track of all the 167/** struct v4l2_ctrl_handler - The control handler keeps track of all the
168 * controls: both the controls owned by the handler and those inherited 168 * controls: both the controls owned by the handler and those inherited
169 * from other handlers. 169 * from other handlers.
170 * @_lock: Default for "lock".
170 * @lock: Lock to control access to this handler and its controls. 171 * @lock: Lock to control access to this handler and its controls.
172 * May be replaced by the user right after init.
171 * @ctrls: The list of controls owned by this handler. 173 * @ctrls: The list of controls owned by this handler.
172 * @ctrl_refs: The list of control references. 174 * @ctrl_refs: The list of control references.
173 * @cached: The last found control reference. It is common that the same 175 * @cached: The last found control reference. It is common that the same
@@ -178,7 +180,8 @@ struct v4l2_ctrl_ref {
178 * @error: The error code of the first failed control addition. 180 * @error: The error code of the first failed control addition.
179 */ 181 */
180struct v4l2_ctrl_handler { 182struct v4l2_ctrl_handler {
181 struct mutex lock; 183 struct mutex _lock;
184 struct mutex *lock;
182 struct list_head ctrls; 185 struct list_head ctrls;
183 struct list_head ctrl_refs; 186 struct list_head ctrl_refs;
184 struct v4l2_ctrl_ref *cached; 187 struct v4l2_ctrl_ref *cached;
@@ -455,7 +458,7 @@ void v4l2_ctrl_grab(struct v4l2_ctrl *ctrl, bool grabbed);
455 */ 458 */
456static inline void v4l2_ctrl_lock(struct v4l2_ctrl *ctrl) 459static inline void v4l2_ctrl_lock(struct v4l2_ctrl *ctrl)
457{ 460{
458 mutex_lock(&ctrl->handler->lock); 461 mutex_lock(ctrl->handler->lock);
459} 462}
460 463
461/** v4l2_ctrl_lock() - Helper function to unlock the handler 464/** v4l2_ctrl_lock() - Helper function to unlock the handler
@@ -464,7 +467,7 @@ static inline void v4l2_ctrl_lock(struct v4l2_ctrl *ctrl)
464 */ 467 */
465static inline void v4l2_ctrl_unlock(struct v4l2_ctrl *ctrl) 468static inline void v4l2_ctrl_unlock(struct v4l2_ctrl *ctrl)
466{ 469{
467 mutex_unlock(&ctrl->handler->lock); 470 mutex_unlock(ctrl->handler->lock);
468} 471}
469 472
470/** v4l2_ctrl_g_ctrl() - Helper function to get the control's value from within a driver. 473/** v4l2_ctrl_g_ctrl() - Helper function to get the control's value from within a driver.