diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-13 01:03:37 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-13 01:03:37 -0300 |
commit | 1dc7f8632084630ef1289d688a85629fbc39d059 (patch) | |
tree | 9a5b1585f41415721cdb3a03f5612b5bc8c25721 | |
parent | 1b0617b59589491cf91d95950da297a72b9c42ad (diff) | |
download | mediapointer-dvb-s2-1dc7f8632084630ef1289d688a85629fbc39d059.tar.gz mediapointer-dvb-s2-1dc7f8632084630ef1289d688a85629fbc39d059.tar.bz2 |
mt9v011: implement VIDIOC_QUERYCTRL
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | linux/drivers/media/video/mt9v011.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/linux/drivers/media/video/mt9v011.c b/linux/drivers/media/video/mt9v011.c index 505529e3e..947a23ac0 100644 --- a/linux/drivers/media/video/mt9v011.c +++ b/linux/drivers/media/video/mt9v011.c @@ -225,6 +225,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); @@ -348,6 +365,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, |