[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>
This commit is contained in:
Hans Verkuil 2012-05-25 12:01:40 -03:00 коммит произвёл Mauro Carvalho Chehab
Родитель a5ee6e41b2
Коммит c44ff8fa02
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1178,7 +1178,7 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
return 0; return 0;
if (vt->type == t->mode && analog_ops->get_afc) if (vt->type == t->mode && analog_ops->get_afc)
vt->afc = analog_ops->get_afc(&t->fe); 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->capability |= V4L2_TUNER_CAP_NORM;
vt->rangelow = tv_range[0] * 16; vt->rangelow = tv_range[0] * 16;
vt->rangehigh = tv_range[1] * 16; vt->rangehigh = tv_range[1] * 16;