summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7115.c
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2010-03-11 22:00:13 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-18 00:50:17 -0300
commitf1a4f9eab2bac10d3145d75342eb372c0ef9f125 (patch)
treec4782782b78dd19938b93d302c076ea740cabc21 /drivers/media/video/saa7115.c
parent87a6fe4a530cc01081d19cdec4738433972fb0ee (diff)
downloadlinux-f1a4f9eab2bac10d3145d75342eb372c0ef9f125.tar.gz
linux-f1a4f9eab2bac10d3145d75342eb372c0ef9f125.tar.bz2
linux-f1a4f9eab2bac10d3145d75342eb372c0ef9f125.zip
V4L/DVB: v4l2-common: add ability to use v4l2_ctrl_query_fill for chroma gain
Add the ability to use the v4l2_ctrl_query_fill() function for the newly introduced chroma gain control. Also, make use of the centralized function by the one caller. This work was sponsored by EyeMagnet Limited. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7115.c')
-rw-r--r--drivers/media/video/saa7115.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c
index f96071c66055..72eaa662b66f 100644
--- a/drivers/media/video/saa7115.c
+++ b/drivers/media/video/saa7115.c
@@ -1234,16 +1234,7 @@ static int saa711x_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc)
case V4L2_CID_CHROMA_AGC:
return v4l2_ctrl_query_fill(qc, 0, 1, 1, 1);
case V4L2_CID_CHROMA_GAIN:
- qc->type = V4L2_CTRL_TYPE_INTEGER;
- qc->flags = V4L2_CTRL_FLAG_SLIDER;
- qc->minimum = 0;
- qc->maximum = 127;
- qc->step = 1;
- qc->default_value = 0x30;
- qc->reserved[0] = 0;
- qc->reserved[1] = 0;
- strlcpy(qc->name, "chroma_gain", sizeof(qc->name));
- return 0;
+ return v4l2_ctrl_query_fill(qc, 0, 127, 1, 48);
default:
return -EINVAL;
}