|
@@ -2444,14 +2444,16 @@ int v4l2_ctrl_subdev_log_status(struct v4l2_subdev *sd)
|
|
|
EXPORT_SYMBOL(v4l2_ctrl_subdev_log_status);
|
|
|
|
|
|
/* Call s_ctrl for all controls owned by the handler */
|
|
|
-int v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler *hdl)
|
|
|
+int __v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler *hdl)
|
|
|
{
|
|
|
struct v4l2_ctrl *ctrl;
|
|
|
int ret = 0;
|
|
|
|
|
|
if (hdl == NULL)
|
|
|
return 0;
|
|
|
- mutex_lock(hdl->lock);
|
|
|
+
|
|
|
+ lockdep_assert_held(hdl->lock);
|
|
|
+
|
|
|
list_for_each_entry(ctrl, &hdl->ctrls, node)
|
|
|
ctrl->done = false;
|
|
|
|
|
@@ -2476,7 +2478,22 @@ int v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler *hdl)
|
|
|
if (ret)
|
|
|
break;
|
|
|
}
|
|
|
+
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+EXPORT_SYMBOL_GPL(__v4l2_ctrl_handler_setup);
|
|
|
+
|
|
|
+int v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler *hdl)
|
|
|
+{
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ if (hdl == NULL)
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ mutex_lock(hdl->lock);
|
|
|
+ ret = __v4l2_ctrl_handler_setup(hdl);
|
|
|
mutex_unlock(hdl->lock);
|
|
|
+
|
|
|
return ret;
|
|
|
}
|
|
|
EXPORT_SYMBOL(v4l2_ctrl_handler_setup);
|