aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Lorenz <tobias.lorenz@gmx.net>2009-06-20 18:17:30 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-12 11:17:12 -0400
commitfca9596b17dd39a110121fc2b2daedcda441ecf4 (patch)
treee192a0b1f66470461433cd293f9e53ad84ecb274
parent9817dc3133b8f75812b8b2c9e7a52c7c34f715d9 (diff)
V4L/DVB (12144): radio-si470x: removed v4l2_queryctrl in favor of v4l2_ctrl_query_fill
Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/radio/radio-si470x.c37
1 files changed, 5 insertions, 32 deletions
diff --git a/drivers/media/radio/radio-si470x.c b/drivers/media/radio/radio-si470x.c
index 179ee86ec922..6710e3f58867 100644
--- a/drivers/media/radio/radio-si470x.c
+++ b/drivers/media/radio/radio-si470x.c
@@ -1242,31 +1242,6 @@ static const struct v4l2_file_operations si470x_fops = {
1242 **************************************************************************/ 1242 **************************************************************************/
1243 1243
1244/* 1244/*
1245 * si470x_v4l2_queryctrl - query control
1246 */
1247static struct v4l2_queryctrl si470x_v4l2_queryctrl[] = {
1248 {
1249 .id = V4L2_CID_AUDIO_VOLUME,
1250 .type = V4L2_CTRL_TYPE_INTEGER,
1251 .name = "Volume",
1252 .minimum = 0,
1253 .maximum = 15,
1254 .step = 1,
1255 .default_value = 15,
1256 },
1257 {
1258 .id = V4L2_CID_AUDIO_MUTE,
1259 .type = V4L2_CTRL_TYPE_BOOLEAN,
1260 .name = "Mute",
1261 .minimum = 0,
1262 .maximum = 1,
1263 .step = 1,
1264 .default_value = 1,
1265 },
1266};
1267
1268
1269/*
1270 * si470x_vidioc_querycap - query device capabilities 1245 * si470x_vidioc_querycap - query device capabilities
1271 */ 1246 */
1272static int si470x_vidioc_querycap(struct file *file, void *priv, 1247static int si470x_vidioc_querycap(struct file *file, void *priv,
@@ -1291,7 +1266,6 @@ static int si470x_vidioc_querycap(struct file *file, void *priv,
1291static int si470x_vidioc_queryctrl(struct file *file, void *priv, 1266static int si470x_vidioc_queryctrl(struct file *file, void *priv,
1292 struct v4l2_queryctrl *qc) 1267 struct v4l2_queryctrl *qc)
1293{ 1268{
1294 unsigned char i = 0;
1295 int retval = -EINVAL; 1269 int retval = -EINVAL;
1296 1270
1297 /* abort if qc->id is below V4L2_CID_BASE */ 1271 /* abort if qc->id is below V4L2_CID_BASE */
@@ -1299,12 +1273,11 @@ static int si470x_vidioc_queryctrl(struct file *file, void *priv,
1299 goto done; 1273 goto done;
1300 1274
1301 /* search video control */ 1275 /* search video control */
1302 for (i = 0; i < ARRAY_SIZE(si470x_v4l2_queryctrl); i++) { 1276 switch (qc->id) {
1303 if (qc->id == si470x_v4l2_queryctrl[i].id) { 1277 case V4L2_CID_AUDIO_VOLUME:
1304 memcpy(qc, &(si470x_v4l2_queryctrl[i]), sizeof(*qc)); 1278 return v4l2_ctrl_query_fill(qc, 0, 15, 1, 15);
1305 retval = 0; /* found */ 1279 case V4L2_CID_AUDIO_MUTE:
1306 break; 1280 return v4l2_ctrl_query_fill(qc, 0, 1, 1, 1);
1307 }
1308 } 1281 }
1309 1282
1310 /* disable unsupported base controls */ 1283 /* disable unsupported base controls */