Hi Hans, On Fri, Feb 02, 2018 at 03:11:48PM +0100, Hans Verkuil wrote: > The __v4l2_ctrl_modify_range is the unlocked variant, so the comment about > taking a lock is obviously wrong. The comment is wrong but I don't think it's a good idea either to leave the matter undocumented. > > Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx> > --- > diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h > index 5253b5471897..33ce194a7481 100644 > --- a/include/media/v4l2-ctrls.h > +++ b/include/media/v4l2-ctrls.h > @@ -760,9 +760,6 @@ void v4l2_ctrl_grab(struct v4l2_ctrl *ctrl, bool grabbed); > * > * An error is returned if one of the range arguments is invalid for this > * control type. > - * > - * This function assumes that the control handler is not locked and will > - * take the lock itself. How about: * The caller must be holding the control handler lock before calling * this function. With that or something alike, Acked-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> > */ > int __v4l2_ctrl_modify_range(struct v4l2_ctrl *ctrl, > s64 min, s64 max, u64 step, s64 def); -- Sakari Ailus sakari.ailus@xxxxxxxxxxxxxxx