diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2011-02-22 10:31:07 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-21 19:32:04 -0400 |
commit | 87a0c94ce616b231f3c0bd09d7dbd39d43b0557a (patch) | |
tree | 21205358c9ea2cc7b58c9b06b16a3bb7dcf08093 /drivers/media/video/v4l2-ctrls.c | |
parent | fb8decfabdf841a199b297076ff9f890dee55e53 (diff) |
[media] v4l2-ctrls: Fix control enumeration for multiple subdevs with 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>
Diffstat (limited to 'drivers/media/video/v4l2-ctrls.c')
-rw-r--r-- | drivers/media/video/v4l2-ctrls.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c index ef66d2af0c57..2412f08527aa 100644 --- a/drivers/media/video/v4l2-ctrls.c +++ b/drivers/media/video/v4l2-ctrls.c | |||
@@ -1364,6 +1364,8 @@ EXPORT_SYMBOL(v4l2_queryctrl); | |||
1364 | 1364 | ||
1365 | int v4l2_subdev_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc) | 1365 | int v4l2_subdev_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc) |
1366 | { | 1366 | { |
1367 | if (qc->id & V4L2_CTRL_FLAG_NEXT_CTRL) | ||
1368 | return -EINVAL; | ||
1367 | return v4l2_queryctrl(sd->ctrl_handler, qc); | 1369 | return v4l2_queryctrl(sd->ctrl_handler, qc); |
1368 | } | 1370 | } |
1369 | EXPORT_SYMBOL(v4l2_subdev_queryctrl); | 1371 | EXPORT_SYMBOL(v4l2_subdev_queryctrl); |