aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/arv.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/arv.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/arv.c')
-rw-r--r--drivers/media/video/arv.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/arv.c b/drivers/media/video/arv.c
index 2ba6abd92b6f..f18fb7367e9a 100644
--- a/drivers/media/video/arv.c
+++ b/drivers/media/video/arv.c
@@ -539,7 +539,7 @@ static int ar_do_ioctl(struct file *file, unsigned int cmd, void *arg)
539 return 0; 539 return 0;
540} 540}
541 541
542static int ar_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 542static int ar_ioctl(struct file *file, unsigned int cmd,
543 unsigned long arg) 543 unsigned long arg)
544{ 544{
545 return video_usercopy(file, cmd, arg, ar_do_ioctl); 545 return video_usercopy(file, cmd, arg, ar_do_ioctl);
@@ -744,27 +744,23 @@ void ar_release(struct video_device *vfd)
744 ****************************************************************************/ 744 ****************************************************************************/
745static struct ar_device ardev; 745static struct ar_device ardev;
746 746
747static int ar_exclusive_open(struct inode *inode, struct file *file) 747static int ar_exclusive_open(struct file *file)
748{ 748{
749 return test_and_set_bit(0, &ardev.in_use) ? -EBUSY : 0; 749 return test_and_set_bit(0, &ardev.in_use) ? -EBUSY : 0;
750} 750}
751 751
752static int ar_exclusive_release(struct inode *inode, struct file *file) 752static int ar_exclusive_release(struct file *file)
753{ 753{
754 clear_bit(0, &ardev.in_use); 754 clear_bit(0, &ardev.in_use);
755 return 0; 755 return 0;
756} 756}
757 757
758static const struct file_operations ar_fops = { 758static const struct v4l2_file_operations ar_fops = {
759 .owner = THIS_MODULE, 759 .owner = THIS_MODULE,
760 .open = ar_exclusive_open, 760 .open = ar_exclusive_open,
761 .release = ar_exclusive_release, 761 .release = ar_exclusive_release,
762 .read = ar_read, 762 .read = ar_read,
763 .ioctl = ar_ioctl, 763 .ioctl = ar_ioctl,
764#ifdef CONFIG_COMPAT
765 .compat_ioctl = v4l_compat_ioctl32,
766#endif
767 .llseek = no_llseek,
768}; 764};
769 765
770static struct video_device ar_template = { 766static struct video_device ar_template = {