diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-01-21 22:02:58 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 13:34:48 -0200 |
commit | 5cc1dd8c3d8f80dbdce4d2e981a5e452af4b4529 (patch) | |
tree | e7232d23668382405a3af48f41a1bf4ab493c95e | |
parent | 69b04f0dc1c489899b610cb44209da9d728b248f (diff) | |
download | op-kernel-dev-5cc1dd8c3d8f80dbdce4d2e981a5e452af4b4529.zip op-kernel-dev-5cc1dd8c3d8f80dbdce4d2e981a5e452af4b4529.tar.gz |
V4L/DVB (5117): Fix: VIDIOC_G_TUNER were returning an endless number of tuners
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)
Acked-by: Mike Isely <isely@isely.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 53323c3..49f5d3c 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c @@ -365,6 +365,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; |