summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-01-21 23:02:58 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-01-21 23:02:58 -0200
commitd8f7b2bfd824a45f93ffb0b3d78976d6e58b79c3 (patch)
tree95e100bb824c71c435b5a1fe196a0d550f038bc3 /linux/drivers/media
parent7fd69e2ae5818df336926da320cba43774081e2b (diff)
downloadmediapointer-dvb-s2-d8f7b2bfd824a45f93ffb0b3d78976d6e58b79c3.tar.gz
mediapointer-dvb-s2-d8f7b2bfd824a45f93ffb0b3d78976d6e58b79c3.tar.bz2
Fix: VIDIOC_G_TUNER were returning an endless number of tuners
From: Mauro Carvalho Chehab <mchehab@infradead.org> pvrusb2 have only one tuner inside. However, as it were not handling index, a call to v4l-info were returning as if it were an infinite number of tuners: $ v4l-info|grep VIDIOC_G_TUNER |head -5 VIDIOC_G_TUNER(0) VIDIOC_G_TUNER(1) VIDIOC_G_TUNER(2) VIDIOC_G_TUNER(3) VIDIOC_G_TUNER(4) CC: Mike Isely <isely@isely.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
index 13dc436f6..621a0dd31 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -366,6 +366,10 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_G_TUNER:
{
struct v4l2_tuner *vt = (struct v4l2_tuner *)arg;
+
+ if (vt->index != 0)
+ break;
+
pvr2_hdw_execute_tuner_poll(hdw);
ret = pvr2_hdw_get_tuner_status(hdw,vt);
break;