aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tvaudio.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-02-21 16:47:24 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:54 -0400
commit10afbef15e7bba5e1008f583852077743d28c395 (patch)
tree73dbfe2a3ccde6ef75c3403fb189274247740003 /drivers/media/video/tvaudio.c
parent1df795370c1392a026c63816368108187aec2ec1 (diff)
V4L/DVB (10698): v4l2-common: remove v4l2_ctrl_query_fill_std
The v4l2_ctrl_query_fill_std() function wasn't one the best idea I ever had. It doesn't add anything valuable that cannot be expressed equally well with v4l2_ctrl_query_fill and only adds overhead. Replace it with v4l2_ctrl_query_fill() everywhere it is used and remove it from v4l2_common.c. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tvaudio.c')
-rw-r--r--drivers/media/video/tvaudio.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
index 076ed5bf48b1..0eb3b1694287 100644
--- a/drivers/media/video/tvaudio.c
+++ b/drivers/media/video/tvaudio.c
@@ -1636,21 +1636,24 @@ static int tvaudio_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc)
1636 1636
1637 switch (qc->id) { 1637 switch (qc->id) {
1638 case V4L2_CID_AUDIO_MUTE: 1638 case V4L2_CID_AUDIO_MUTE:
1639 break; 1639 return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
1640 case V4L2_CID_AUDIO_VOLUME: 1640 case V4L2_CID_AUDIO_VOLUME:
1641 if (desc->flags & CHIP_HAS_VOLUME)
1642 return v4l2_ctrl_query_fill(qc, 0, 65535, 65535 / 100, 58880);
1643 break;
1641 case V4L2_CID_AUDIO_BALANCE: 1644 case V4L2_CID_AUDIO_BALANCE:
1642 if (!(desc->flags & CHIP_HAS_VOLUME)) 1645 if (desc->flags & CHIP_HAS_VOLUME)
1643 return -EINVAL; 1646 return v4l2_ctrl_query_fill(qc, 0, 65535, 65535 / 100, 32768);
1644 break; 1647 break;
1645 case V4L2_CID_AUDIO_BASS: 1648 case V4L2_CID_AUDIO_BASS:
1646 case V4L2_CID_AUDIO_TREBLE: 1649 case V4L2_CID_AUDIO_TREBLE:
1647 if (!(desc->flags & CHIP_HAS_BASSTREBLE)) 1650 if (desc->flags & CHIP_HAS_BASSTREBLE)
1648 return -EINVAL; 1651 return v4l2_ctrl_query_fill(qc, 0, 65535, 65535 / 100, 32768);
1649 break; 1652 break;
1650 default: 1653 default:
1651 return -EINVAL; 1654 break;
1652 } 1655 }
1653 return v4l2_ctrl_query_fill_std(qc); 1656 return -EINVAL;
1654} 1657}
1655 1658
1656static int tvaudio_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *rt) 1659static int tvaudio_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *rt)