Skip to content

Commit

Permalink
[media] v4l2-ctrls: Fix control enumeration for multiple subdevs with…
Browse files Browse the repository at this point in the history
… ctrl

v4l2-ctl and qv4l2 enumerate controls using V4L2_CTRL_FLAG_NEXT_CTRL,
falling back to the old method if the flag isn't supported.

The v4l2_subdev_queryctrl function will currently handle that flag, but
for the controls of the subdev only. This isn't right, it should refuse
this flag, otherwise v4l2-ctl will only see the controls of the first
subdev.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 21, 2011
1 parent fb8decf commit 87a0c94
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/video/v4l2-ctrls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1364,6 +1364,8 @@ EXPORT_SYMBOL(v4l2_queryctrl);

int v4l2_subdev_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc)
{
if (qc->id & V4L2_CTRL_FLAG_NEXT_CTRL)
return -EINVAL;
return v4l2_queryctrl(sd->ctrl_handler, qc);
}
EXPORT_SYMBOL(v4l2_subdev_queryctrl);
Expand Down

0 comments on commit 87a0c94

Please sign in to comment.