Commit 273775ee authored by Dikshita Agarwal's avatar Dikshita Agarwal Committed by Mauro Carvalho Chehab

media: v4l2-ctrls: allow V4L2_CTRL_TYPE_BUTTON with request api

remove check for V4L2_CTRL_TYPE_BUTTON from
v4l2_ctrl_request_clone and v4l2_ctrl_request_setup().
Signed-off-by: default avatarDikshita Agarwal <dikshita@codeaurora.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent e6938cc1
......@@ -3363,9 +3363,6 @@ static int v4l2_ctrl_request_clone(struct v4l2_ctrl_handler *hdl,
/* Skip refs inherited from other devices */
if (ref->from_other_dev)
continue;
/* And buttons */
if (ctrl->type == V4L2_CTRL_TYPE_BUTTON)
continue;
err = handler_new_ref(hdl, ctrl, &new_ref, false, true);
if (err)
break;
......@@ -4447,8 +4444,7 @@ int v4l2_ctrl_request_setup(struct media_request *req,
* Skip if this control was already handled by a cluster.
* Skip button controls and read-only controls.
*/
if (ref->req_done || ctrl->type == V4L2_CTRL_TYPE_BUTTON ||
(ctrl->flags & V4L2_CTRL_FLAG_READ_ONLY))
if (ref->req_done || (ctrl->flags & V4L2_CTRL_FLAG_READ_ONLY))
continue;
v4l2_ctrl_lock(master);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment