Commit 5cc1dd8c authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

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: default avatarMike Isely <isely@isely.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 69b04f0d
...@@ -365,6 +365,10 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, ...@@ -365,6 +365,10 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_G_TUNER: case VIDIOC_G_TUNER:
{ {
struct v4l2_tuner *vt = (struct v4l2_tuner *)arg; struct v4l2_tuner *vt = (struct v4l2_tuner *)arg;
if (vt->index != 0)
break;
pvr2_hdw_execute_tuner_poll(hdw); pvr2_hdw_execute_tuner_poll(hdw);
ret = pvr2_hdw_get_tuner_status(hdw,vt); ret = pvr2_hdw_get_tuner_status(hdw,vt);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment