diff options
author | Tobias Lorenz <tobias.lorenz@gmx.net> | 2009-06-21 00:17:30 +0200 |
---|---|---|
committer | Tobias Lorenz <tobias.lorenz@gmx.net> | 2009-06-21 00:17:30 +0200 |
commit | cde1c0fde4222d9ad97877a793a9143f9b4cd850 (patch) | |
tree | 53884f8d27354e76ded1666b0a021aed0ac00fab /linux/drivers/media/radio | |
parent | 98c1432a2113aa0c3aa68dcd754f61527375b7f8 (diff) | |
download | mediapointer-dvb-s2-cde1c0fde4222d9ad97877a793a9143f9b4cd850.tar.gz mediapointer-dvb-s2-cde1c0fde4222d9ad97877a793a9143f9b4cd850.tar.bz2 |
removed v4l2_queryctrl in favor of v4l2_ctrl_query_fill
Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Diffstat (limited to 'linux/drivers/media/radio')
-rw-r--r-- | linux/drivers/media/radio/radio-si470x.c | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/linux/drivers/media/radio/radio-si470x.c b/linux/drivers/media/radio/radio-si470x.c index a40c8f355..de4673b3a 100644 --- a/linux/drivers/media/radio/radio-si470x.c +++ b/linux/drivers/media/radio/radio-si470x.c @@ -1243,31 +1243,6 @@ static const struct v4l2_file_operations si470x_fops = { **************************************************************************/ /* - * si470x_v4l2_queryctrl - query control - */ -static struct v4l2_queryctrl si470x_v4l2_queryctrl[] = { - { - .id = V4L2_CID_AUDIO_VOLUME, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "Volume", - .minimum = 0, - .maximum = 15, - .step = 1, - .default_value = 15, - }, - { - .id = V4L2_CID_AUDIO_MUTE, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "Mute", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 1, - }, -}; - - -/* * si470x_vidioc_querycap - query device capabilities */ static int si470x_vidioc_querycap(struct file *file, void *priv, @@ -1292,7 +1267,6 @@ static int si470x_vidioc_querycap(struct file *file, void *priv, static int si470x_vidioc_queryctrl(struct file *file, void *priv, struct v4l2_queryctrl *qc) { - unsigned char i = 0; int retval = -EINVAL; /* abort if qc->id is below V4L2_CID_BASE */ @@ -1300,12 +1274,11 @@ static int si470x_vidioc_queryctrl(struct file *file, void *priv, goto done; /* search video control */ - for (i = 0; i < ARRAY_SIZE(si470x_v4l2_queryctrl); i++) { - if (qc->id == si470x_v4l2_queryctrl[i].id) { - memcpy(qc, &(si470x_v4l2_queryctrl[i]), sizeof(*qc)); - retval = 0; /* found */ - break; - } + switch (qc->id) { + case V4L2_CID_AUDIO_VOLUME: + return v4l2_ctrl_query_fill(qc, 0, 15, 1, 15); + case V4L2_CID_AUDIO_MUTE: + return v4l2_ctrl_query_fill(qc, 0, 1, 1, 1); } /* disable unsupported base controls */ |