aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-07-13 00:03:37 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-07-24 13:03:24 -0400
commit9873740b2f41b37ec074afd4b8910b87dbebc0db (patch)
tree46913ac73a9a17ee26b8bb4431399619e7e8c276 /drivers/media
parent527f09a981e398331c2f8d8f7af83cd46e6a06cc (diff)
V4L/DVB (12237): mt9v011: implement VIDIOC_QUERYCTRL
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/mt9v011.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/media/video/mt9v011.c b/drivers/media/video/mt9v011.c
index 1fe8fc9183a7..241382f5ba21 100644
--- a/drivers/media/video/mt9v011.c
+++ b/drivers/media/video/mt9v011.c
@@ -215,6 +215,23 @@ static int mt9v011_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
215 return -EINVAL; 215 return -EINVAL;
216} 216}
217 217
218static int mt9v011_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc)
219{
220 int i;
221
222 v4l2_dbg(1, debug, sd, "queryctrl called\n");
223
224 for (i = 0; i < ARRAY_SIZE(mt9v011_qctrl); i++)
225 if (qc->id && qc->id == mt9v011_qctrl[i].id) {
226 memcpy(qc, &(mt9v011_qctrl[i]),
227 sizeof(*qc));
228 return 0;
229 }
230
231 return -EINVAL;
232}
233
234
218static int mt9v011_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) 235static int mt9v011_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
219{ 236{
220 struct mt9v011 *core = to_mt9v011(sd); 237 struct mt9v011 *core = to_mt9v011(sd);
@@ -338,6 +355,7 @@ static int mt9v011_g_chip_ident(struct v4l2_subdev *sd,
338} 355}
339 356
340static const struct v4l2_subdev_core_ops mt9v011_core_ops = { 357static const struct v4l2_subdev_core_ops mt9v011_core_ops = {
358 .queryctrl = mt9v011_queryctrl,
341 .g_ctrl = mt9v011_g_ctrl, 359 .g_ctrl = mt9v011_g_ctrl,
342 .s_ctrl = mt9v011_s_ctrl, 360 .s_ctrl = mt9v011_s_ctrl,
343 .reset = mt9v011_reset, 361 .reset = mt9v011_reset,