aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ov511.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-12-30 04:58:20 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-01-02 14:11:12 -0500
commitbec43661b1dc0075b7445223ba775674133b164d (patch)
tree2a09ad5cc78799985e5cfb789f0a23db58e70499 /drivers/media/video/ov511.c
parentdfa9a5ae679ff2d23caa995d0f55a19abaf0596e (diff)
V4L/DVB (10135): v4l2: introduce v4l2_file_operations.
Introduce a struct v4l2_file_operations for v4l2 drivers. Remove the unnecessary inode argument. Move compat32 handling (and llseek) into the v4l2-dev core: this is now handled in the v4l2 core and no longer in the drivers themselves. Note that this changeset reverts an earlier patch that changed the return type of__video_ioctl2 from int to long. This change will be reinstated later in a much improved version. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ov511.c')
-rw-r--r--drivers/media/video/ov511.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c
index 6ee9b69cc4a9..f1754dc5587e 100644
--- a/drivers/media/video/ov511.c
+++ b/drivers/media/video/ov511.c
@@ -3915,7 +3915,7 @@ ov51x_dealloc(struct usb_ov511 *ov)
3915 ***************************************************************************/ 3915 ***************************************************************************/
3916 3916
3917static int 3917static int
3918ov51x_v4l1_open(struct inode *inode, struct file *file) 3918ov51x_v4l1_open(struct file *file)
3919{ 3919{
3920 struct video_device *vdev = video_devdata(file); 3920 struct video_device *vdev = video_devdata(file);
3921 struct usb_ov511 *ov = video_get_drvdata(vdev); 3921 struct usb_ov511 *ov = video_get_drvdata(vdev);
@@ -3972,7 +3972,7 @@ out:
3972} 3972}
3973 3973
3974static int 3974static int
3975ov51x_v4l1_close(struct inode *inode, struct file *file) 3975ov51x_v4l1_close(struct file *file)
3976{ 3976{
3977 struct video_device *vdev = file->private_data; 3977 struct video_device *vdev = file->private_data;
3978 struct usb_ov511 *ov = video_get_drvdata(vdev); 3978 struct usb_ov511 *ov = video_get_drvdata(vdev);
@@ -4450,7 +4450,7 @@ redo:
4450} 4450}
4451 4451
4452static int 4452static int
4453ov51x_v4l1_ioctl(struct inode *inode, struct file *file, 4453ov51x_v4l1_ioctl(struct file *file,
4454 unsigned int cmd, unsigned long arg) 4454 unsigned int cmd, unsigned long arg)
4455{ 4455{
4456 struct video_device *vdev = file->private_data; 4456 struct video_device *vdev = file->private_data;
@@ -4661,17 +4661,13 @@ ov51x_v4l1_mmap(struct file *file, struct vm_area_struct *vma)
4661 return 0; 4661 return 0;
4662} 4662}
4663 4663
4664static const struct file_operations ov511_fops = { 4664static const struct v4l2_file_operations ov511_fops = {
4665 .owner = THIS_MODULE, 4665 .owner = THIS_MODULE,
4666 .open = ov51x_v4l1_open, 4666 .open = ov51x_v4l1_open,
4667 .release = ov51x_v4l1_close, 4667 .release = ov51x_v4l1_close,
4668 .read = ov51x_v4l1_read, 4668 .read = ov51x_v4l1_read,
4669 .mmap = ov51x_v4l1_mmap, 4669 .mmap = ov51x_v4l1_mmap,
4670 .ioctl = ov51x_v4l1_ioctl, 4670 .ioctl = ov51x_v4l1_ioctl,
4671#ifdef CONFIG_COMPAT
4672 .compat_ioctl = v4l_compat_ioctl32,
4673#endif
4674 .llseek = no_llseek,
4675}; 4671};
4676 4672
4677static struct video_device vdev_template = { 4673static struct video_device vdev_template = {