diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-12-30 04:58:20 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-02 14:11:12 -0500 |
commit | bec43661b1dc0075b7445223ba775674133b164d (patch) | |
tree | 2a09ad5cc78799985e5cfb789f0a23db58e70499 /drivers/media/video/cpia.c | |
parent | dfa9a5ae679ff2d23caa995d0f55a19abaf0596e (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/cpia.c')
-rw-r--r-- | drivers/media/video/cpia.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c index 028a400d2453..9925ec0ab29d 100644 --- a/drivers/media/video/cpia.c +++ b/drivers/media/video/cpia.c | |||
@@ -3148,7 +3148,7 @@ static void put_cam(struct cpia_camera_ops* ops) | |||
3148 | } | 3148 | } |
3149 | 3149 | ||
3150 | /* ------------------------- V4L interface --------------------- */ | 3150 | /* ------------------------- V4L interface --------------------- */ |
3151 | static int cpia_open(struct inode *inode, struct file *file) | 3151 | static int cpia_open(struct file *file) |
3152 | { | 3152 | { |
3153 | struct video_device *dev = video_devdata(file); | 3153 | struct video_device *dev = video_devdata(file); |
3154 | struct cam_data *cam = video_get_drvdata(dev); | 3154 | struct cam_data *cam = video_get_drvdata(dev); |
@@ -3225,7 +3225,7 @@ static int cpia_open(struct inode *inode, struct file *file) | |||
3225 | return err; | 3225 | return err; |
3226 | } | 3226 | } |
3227 | 3227 | ||
3228 | static int cpia_close(struct inode *inode, struct file *file) | 3228 | static int cpia_close(struct file *file) |
3229 | { | 3229 | { |
3230 | struct video_device *dev = file->private_data; | 3230 | struct video_device *dev = file->private_data; |
3231 | struct cam_data *cam = video_get_drvdata(dev); | 3231 | struct cam_data *cam = video_get_drvdata(dev); |
@@ -3720,7 +3720,7 @@ static int cpia_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
3720 | return retval; | 3720 | return retval; |
3721 | } | 3721 | } |
3722 | 3722 | ||
3723 | static int cpia_ioctl(struct inode *inode, struct file *file, | 3723 | static int cpia_ioctl(struct file *file, |
3724 | unsigned int cmd, unsigned long arg) | 3724 | unsigned int cmd, unsigned long arg) |
3725 | { | 3725 | { |
3726 | return video_usercopy(file, cmd, arg, cpia_do_ioctl); | 3726 | return video_usercopy(file, cmd, arg, cpia_do_ioctl); |
@@ -3780,17 +3780,13 @@ static int cpia_mmap(struct file *file, struct vm_area_struct *vma) | |||
3780 | return 0; | 3780 | return 0; |
3781 | } | 3781 | } |
3782 | 3782 | ||
3783 | static const struct file_operations cpia_fops = { | 3783 | static const struct v4l2_file_operations cpia_fops = { |
3784 | .owner = THIS_MODULE, | 3784 | .owner = THIS_MODULE, |
3785 | .open = cpia_open, | 3785 | .open = cpia_open, |
3786 | .release = cpia_close, | 3786 | .release = cpia_close, |
3787 | .read = cpia_read, | 3787 | .read = cpia_read, |
3788 | .mmap = cpia_mmap, | 3788 | .mmap = cpia_mmap, |
3789 | .ioctl = cpia_ioctl, | 3789 | .ioctl = cpia_ioctl, |
3790 | #ifdef CONFIG_COMPAT | ||
3791 | .compat_ioctl = v4l_compat_ioctl32, | ||
3792 | #endif | ||
3793 | .llseek = no_llseek, | ||
3794 | }; | 3790 | }; |
3795 | 3791 | ||
3796 | static struct video_device cpia_template = { | 3792 | static struct video_device cpia_template = { |