diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2011-05-02 07:09:25 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-04 15:42:55 -0400 |
commit | 0b84834a5a9f5fe8f3760560ef8c5b1536d22bd1 (patch) | |
tree | e52094f733316990d2a01196563339a1046c9402 | |
parent | 2a164d02dd34c6b49a3f0995900e0f8af102b804 (diff) |
[media] v4l2-subdev: fix broken subdev control enumeration
The v4l2_subdev_* functions are meant for older V4L2 drivers that do not use
the control framework yet. These functions should not be used by subdev_do_ioctl.
Most of those backwards compatibility functions are just stubs, but commit
87a0c94ce616b231f3c0bd09d7dbd39d43b0557a actually changed the behavior of
v4l2_subdev_queryctrl, so calling that one from subdev_do_ioctl broke the
control enumeration in subdev nodes.
The fix is simply not to use those compatibility functions in v4l2-subdev.c.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/v4l2-subdev.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/v4l2-subdev.c b/drivers/media/video/v4l2-subdev.c index 0b8064490676..812729ebf09e 100644 --- a/drivers/media/video/v4l2-subdev.c +++ b/drivers/media/video/v4l2-subdev.c | |||
@@ -155,25 +155,25 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
155 | 155 | ||
156 | switch (cmd) { | 156 | switch (cmd) { |
157 | case VIDIOC_QUERYCTRL: | 157 | case VIDIOC_QUERYCTRL: |
158 | return v4l2_subdev_queryctrl(sd, arg); | 158 | return v4l2_queryctrl(sd->ctrl_handler, arg); |
159 | 159 | ||
160 | case VIDIOC_QUERYMENU: | 160 | case VIDIOC_QUERYMENU: |
161 | return v4l2_subdev_querymenu(sd, arg); | 161 | return v4l2_querymenu(sd->ctrl_handler, arg); |
162 | 162 | ||
163 | case VIDIOC_G_CTRL: | 163 | case VIDIOC_G_CTRL: |
164 | return v4l2_subdev_g_ctrl(sd, arg); | 164 | return v4l2_g_ctrl(sd->ctrl_handler, arg); |
165 | 165 | ||
166 | case VIDIOC_S_CTRL: | 166 | case VIDIOC_S_CTRL: |
167 | return v4l2_subdev_s_ctrl(sd, arg); | 167 | return v4l2_s_ctrl(sd->ctrl_handler, arg); |
168 | 168 | ||
169 | case VIDIOC_G_EXT_CTRLS: | 169 | case VIDIOC_G_EXT_CTRLS: |
170 | return v4l2_subdev_g_ext_ctrls(sd, arg); | 170 | return v4l2_g_ext_ctrls(sd->ctrl_handler, arg); |
171 | 171 | ||
172 | case VIDIOC_S_EXT_CTRLS: | 172 | case VIDIOC_S_EXT_CTRLS: |
173 | return v4l2_subdev_s_ext_ctrls(sd, arg); | 173 | return v4l2_s_ext_ctrls(sd->ctrl_handler, arg); |
174 | 174 | ||
175 | case VIDIOC_TRY_EXT_CTRLS: | 175 | case VIDIOC_TRY_EXT_CTRLS: |
176 | return v4l2_subdev_try_ext_ctrls(sd, arg); | 176 | return v4l2_try_ext_ctrls(sd->ctrl_handler, arg); |
177 | 177 | ||
178 | case VIDIOC_DQEVENT: | 178 | case VIDIOC_DQEVENT: |
179 | if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS)) | 179 | if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS)) |