diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-05-06 13:31:27 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-14 15:04:11 -0300 |
commit | a299e407b9ef356bf14fbb49793dc026877440df (patch) | |
tree | fa83baff4fe3ac75c801d6295cd3c2b0e08d2647 /drivers/media/common/saa7146_fops.c | |
parent | 7088f4df4c489811f6a5ad9a883b7dd259adfb6a (diff) | |
download | linux-a299e407b9ef356bf14fbb49793dc026877440df.tar.bz2 |
[media] av7110: fix v4l2_compliance test issues
Besides the usual inconsistencies in input enumeration there was also a
kernel crash if you tried to poll on a vbi node. The checks for sliced
vbi output vs vbi capture were not complete enough.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/saa7146_fops.c')
-rw-r--r-- | drivers/media/common/saa7146_fops.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c index 428a543ec2ce..7d42c11c8684 100644 --- a/drivers/media/common/saa7146_fops.c +++ b/drivers/media/common/saa7146_fops.c @@ -309,6 +309,8 @@ static int fops_mmap(struct file *file, struct vm_area_struct * vma) case VFL_TYPE_VBI: { DEB_EE("V4L2_BUF_TYPE_VBI_CAPTURE: file:%p, vma:%p\n", file, vma); + if (fh->dev->ext_vv_data->capabilities & V4L2_CAP_SLICED_VBI_OUTPUT) + return -ENODEV; q = &fh->vbi_q; break; } @@ -331,6 +333,8 @@ static unsigned int fops_poll(struct file *file, struct poll_table_struct *wait) DEB_EE("file:%p, poll:%p\n", file, wait); if (vdev->vfl_type == VFL_TYPE_VBI) { + if (fh->dev->ext_vv_data->capabilities & V4L2_CAP_SLICED_VBI_OUTPUT) + return res | POLLOUT | POLLWRNORM; if( 0 == fh->vbi_q.streaming ) return res | videobuf_poll_stream(file, &fh->vbi_q, wait); q = &fh->vbi_q; |