diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-13 06:03:37 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-24 19:03:24 +0200 |
commit | 9873740b2f41b37ec074afd4b8910b87dbebc0db (patch) | |
tree | 46913ac73a9a17ee26b8bb4431399619e7e8c276 /drivers | |
parent | V4L/DVB (12236): em28xx: stop abusing of board->decoder for sensor information (diff) | |
download | linux-9873740b2f41b37ec074afd4b8910b87dbebc0db.tar.xz linux-9873740b2f41b37ec074afd4b8910b87dbebc0db.zip |
V4L/DVB (12237): mt9v011: implement VIDIOC_QUERYCTRL
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/mt9v011.c | 18 |
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) return -EINVAL; } +static int mt9v011_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc) +{ + int i; + + v4l2_dbg(1, debug, sd, "queryctrl called\n"); + + for (i = 0; i < ARRAY_SIZE(mt9v011_qctrl); i++) + if (qc->id && qc->id == mt9v011_qctrl[i].id) { + memcpy(qc, &(mt9v011_qctrl[i]), + sizeof(*qc)); + return 0; + } + + return -EINVAL; +} + + static int mt9v011_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) { struct mt9v011 *core = to_mt9v011(sd); @@ -338,6 +355,7 @@ static int mt9v011_g_chip_ident(struct v4l2_subdev *sd, } static const struct v4l2_subdev_core_ops mt9v011_core_ops = { + .queryctrl = mt9v011_queryctrl, .g_ctrl = mt9v011_g_ctrl, .s_ctrl = mt9v011_s_ctrl, .reset = mt9v011_reset, |