aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/w9968cf.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/w9968cf.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/w9968cf.c')
-rw-r--r--drivers/media/video/w9968cf.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/drivers/media/video/w9968cf.c b/drivers/media/video/w9968cf.c
index 4dfb43bd1846..159b4edd69e0 100644
--- a/drivers/media/video/w9968cf.c
+++ b/drivers/media/video/w9968cf.c
@@ -399,13 +399,13 @@ MODULE_PARM_DESC(specific_debug,
399 ****************************************************************************/ 399 ****************************************************************************/
400 400
401/* Video4linux interface */ 401/* Video4linux interface */
402static const struct file_operations w9968cf_fops; 402static const struct v4l2_file_operations w9968cf_fops;
403static int w9968cf_open(struct inode*, struct file*); 403static int w9968cf_open(struct file *);
404static int w9968cf_release(struct inode*, struct file*); 404static int w9968cf_release(struct file *);
405static int w9968cf_mmap(struct file*, struct vm_area_struct*); 405static int w9968cf_mmap(struct file *, struct vm_area_struct *);
406static int w9968cf_ioctl(struct inode*, struct file*, unsigned, unsigned long); 406static int w9968cf_ioctl(struct file *, unsigned, unsigned long);
407static ssize_t w9968cf_read(struct file*, char __user *, size_t, loff_t*); 407static ssize_t w9968cf_read(struct file *, char __user *, size_t, loff_t *);
408static int w9968cf_v4l_ioctl(struct inode*, struct file*, unsigned int, 408static int w9968cf_v4l_ioctl(struct file *, unsigned int,
409 void __user *); 409 void __user *);
410 410
411/* USB-specific */ 411/* USB-specific */
@@ -2662,7 +2662,7 @@ static void w9968cf_release_resources(struct w9968cf_device* cam)
2662 * Video4Linux interface * 2662 * Video4Linux interface *
2663 ****************************************************************************/ 2663 ****************************************************************************/
2664 2664
2665static int w9968cf_open(struct inode* inode, struct file* filp) 2665static int w9968cf_open(struct file *filp)
2666{ 2666{
2667 struct w9968cf_device* cam; 2667 struct w9968cf_device* cam;
2668 int err; 2668 int err;
@@ -2748,7 +2748,7 @@ deallocate_memory:
2748} 2748}
2749 2749
2750 2750
2751static int w9968cf_release(struct inode* inode, struct file* filp) 2751static int w9968cf_release(struct file *filp)
2752{ 2752{
2753 struct w9968cf_device* cam; 2753 struct w9968cf_device* cam;
2754 2754
@@ -2886,7 +2886,7 @@ static int w9968cf_mmap(struct file* filp, struct vm_area_struct *vma)
2886 2886
2887 2887
2888static int 2888static int
2889w9968cf_ioctl(struct inode* inode, struct file* filp, 2889w9968cf_ioctl(struct file *filp,
2890 unsigned int cmd, unsigned long arg) 2890 unsigned int cmd, unsigned long arg)
2891{ 2891{
2892 struct w9968cf_device* cam; 2892 struct w9968cf_device* cam;
@@ -2909,15 +2909,15 @@ w9968cf_ioctl(struct inode* inode, struct file* filp,
2909 return -EIO; 2909 return -EIO;
2910 } 2910 }
2911 2911
2912 err = w9968cf_v4l_ioctl(inode, filp, cmd, (void __user *)arg); 2912 err = w9968cf_v4l_ioctl(filp, cmd, (void __user *)arg);
2913 2913
2914 mutex_unlock(&cam->fileop_mutex); 2914 mutex_unlock(&cam->fileop_mutex);
2915 return err; 2915 return err;
2916} 2916}
2917 2917
2918 2918
2919static int w9968cf_v4l_ioctl(struct inode* inode, struct file* filp, 2919static int w9968cf_v4l_ioctl(struct file *filp,
2920 unsigned int cmd, void __user * arg) 2920 unsigned int cmd, void __user *arg)
2921{ 2921{
2922 struct w9968cf_device* cam; 2922 struct w9968cf_device* cam;
2923 const char* v4l1_ioctls[] = { 2923 const char* v4l1_ioctls[] = {
@@ -3456,17 +3456,13 @@ ioctl_fail:
3456} 3456}
3457 3457
3458 3458
3459static const struct file_operations w9968cf_fops = { 3459static const struct v4l2_file_operations w9968cf_fops = {
3460 .owner = THIS_MODULE, 3460 .owner = THIS_MODULE,
3461 .open = w9968cf_open, 3461 .open = w9968cf_open,
3462 .release = w9968cf_release, 3462 .release = w9968cf_release,
3463 .read = w9968cf_read, 3463 .read = w9968cf_read,
3464 .ioctl = w9968cf_ioctl, 3464 .ioctl = w9968cf_ioctl,
3465#ifdef CONFIG_COMPAT
3466 .compat_ioctl = v4l_compat_ioctl32,
3467#endif
3468 .mmap = w9968cf_mmap, 3465 .mmap = w9968cf_mmap,
3469 .llseek = no_llseek,
3470}; 3466};
3471 3467
3472 3468