summaryrefslogtreecommitdiff
path: root/drivers/media/video/ivtv
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2011-06-25 10:28:21 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-07 15:07:43 -0300
commitd118e294e27000bfd728308d7b74ba67350e779c (patch)
treecd45e1471f86429afbf960f098ec2d4d35766a30 /drivers/media/video/ivtv
parentd16625e788b8871163ad991851ffba5f64c06d43 (diff)
[media] cx18/ivtv: fix g_tuner support
The driver shouldn't override vt->type, and the tuner name should be based on vt->type as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ivtv')
-rw-r--r--drivers/media/video/ivtv/ivtv-ioctl.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c
index f9e347dae739..120c7d8e0895 100644
--- a/drivers/media/video/ivtv/ivtv-ioctl.c
+++ b/drivers/media/video/ivtv/ivtv-ioctl.c
@@ -1184,14 +1184,10 @@ static int ivtv_g_tuner(struct file *file, void *fh, struct v4l2_tuner *vt)
ivtv_call_all(itv, tuner, g_tuner, vt);
- if (test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags)) {
+ if (vt->type == V4L2_TUNER_RADIO)
strlcpy(vt->name, "ivtv Radio Tuner", sizeof(vt->name));
- vt->type = V4L2_TUNER_RADIO;
- } else {
+ else
strlcpy(vt->name, "ivtv TV Tuner", sizeof(vt->name));
- vt->type = V4L2_TUNER_ANALOG_TV;
- }
-
return 0;
}