summaryrefslogtreecommitdiff
path: root/drivers/media/common/saa7146_fops.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-05-01 12:57:57 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-14 15:00:49 -0300
commitab49ae0f201f1e7e07250d011fffde8ed2530175 (patch)
tree0fb1a572c621f44b3974c994b65e4a7ba9902201 /drivers/media/common/saa7146_fops.c
parent537fa492e084af58d16899f8d0f3f3516a4fbe7c (diff)
[media] saa7146: fix querycap, vbi/video separation and g/s_register
The querycap ioctl returned an incorrect version number and incorrect capabilities (mixing up vbi and video caps). The reason for that was that video nodes could do vbi activities: that should be separated between the vbi and video nodes. There were also a few minor problems with dbg_g/s_register that have been resolved. The mxb/saa7146 driver now passes the v4l2_compliance tests. 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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c
index dfb396568ab6..428a543ec2ce 100644
--- a/drivers/media/common/saa7146_fops.c
+++ b/drivers/media/common/saa7146_fops.c
@@ -478,7 +478,8 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
v4l2_ctrl_handler_free(hdl);
return -ENOMEM;
}
- ext_vv->ops = saa7146_video_ioctl_ops;
+ ext_vv->vid_ops = saa7146_video_ioctl_ops;
+ ext_vv->vbi_ops = saa7146_vbi_ioctl_ops;
ext_vv->core_ops = &saa7146_video_ioctl_ops;
DEB_EE("dev:%p\n", dev);
@@ -579,7 +580,10 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
return -ENOMEM;
vfd->fops = &video_fops;
- vfd->ioctl_ops = &dev->ext_vv_data->ops;
+ if (type == VFL_TYPE_GRABBER)
+ vfd->ioctl_ops = &dev->ext_vv_data->vid_ops;
+ else
+ vfd->ioctl_ops = &dev->ext_vv_data->vbi_ops;
vfd->release = video_device_release;
/* Locking in file operations other than ioctl should be done by
the driver, not the V4L2 core.