summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-05-25 17:01:40 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-06-11 23:12:56 +0200
commitc44ff8fa026ab34d95ce0805a56ca507c313a91d (patch)
tree0445e720c6313a851cb9c5b0eab224285a10b7c5
parent[media] v4l2-dev.c: fix g_parm regression in determine_valid_ioctls() (diff)
downloadlinux-c44ff8fa026ab34d95ce0805a56ca507c313a91d.tar.xz
linux-c44ff8fa026ab34d95ce0805a56ca507c313a91d.zip
[media] tuner-core: return the frequency range of the correct tuner
The frequency range of the current tuner (radio or TV) was returned instead of the frequency range of the requested tuner (which depends on the device node). This bug caused the frequency range of the radio tuner to be returned when G_TUNER was called on a video node. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/tuner-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 3e050e12153b..1ad5ab6ce5cf 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -1178,7 +1178,7 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
return 0;
if (vt->type == t->mode && analog_ops->get_afc)
vt->afc = analog_ops->get_afc(&t->fe);
- if (t->mode != V4L2_TUNER_RADIO) {
+ if (vt->type != V4L2_TUNER_RADIO) {
vt->capability |= V4L2_TUNER_CAP_NORM;
vt->rangelow = tv_range[0] * 16;
vt->rangehigh = tv_range[1] * 16;