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/pms.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/pms.c')
-rw-r--r-- | drivers/media/video/pms.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/pms.c b/drivers/media/video/pms.c index 45730fac1570..24f2b3d9977f 100644 --- a/drivers/media/video/pms.c +++ b/drivers/media/video/pms.c | |||
@@ -862,7 +862,7 @@ static int pms_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
862 | return 0; | 862 | return 0; |
863 | } | 863 | } |
864 | 864 | ||
865 | static int pms_ioctl(struct inode *inode, struct file *file, | 865 | static int pms_ioctl(struct file *file, |
866 | unsigned int cmd, unsigned long arg) | 866 | unsigned int cmd, unsigned long arg) |
867 | { | 867 | { |
868 | return video_usercopy(file, cmd, arg, pms_do_ioctl); | 868 | return video_usercopy(file, cmd, arg, pms_do_ioctl); |
@@ -881,7 +881,7 @@ static ssize_t pms_read(struct file *file, char __user *buf, | |||
881 | return len; | 881 | return len; |
882 | } | 882 | } |
883 | 883 | ||
884 | static int pms_exclusive_open(struct inode *inode, struct file *file) | 884 | static int pms_exclusive_open(struct file *file) |
885 | { | 885 | { |
886 | struct video_device *v = video_devdata(file); | 886 | struct video_device *v = video_devdata(file); |
887 | struct pms_device *pd = (struct pms_device *)v; | 887 | struct pms_device *pd = (struct pms_device *)v; |
@@ -889,7 +889,7 @@ static int pms_exclusive_open(struct inode *inode, struct file *file) | |||
889 | return test_and_set_bit(0, &pd->in_use) ? -EBUSY : 0; | 889 | return test_and_set_bit(0, &pd->in_use) ? -EBUSY : 0; |
890 | } | 890 | } |
891 | 891 | ||
892 | static int pms_exclusive_release(struct inode *inode, struct file *file) | 892 | static int pms_exclusive_release(struct file *file) |
893 | { | 893 | { |
894 | struct video_device *v = video_devdata(file); | 894 | struct video_device *v = video_devdata(file); |
895 | struct pms_device *pd = (struct pms_device *)v; | 895 | struct pms_device *pd = (struct pms_device *)v; |
@@ -898,16 +898,12 @@ static int pms_exclusive_release(struct inode *inode, struct file *file) | |||
898 | return 0; | 898 | return 0; |
899 | } | 899 | } |
900 | 900 | ||
901 | static const struct file_operations pms_fops = { | 901 | static const struct v4l2_file_operations pms_fops = { |
902 | .owner = THIS_MODULE, | 902 | .owner = THIS_MODULE, |
903 | .open = pms_exclusive_open, | 903 | .open = pms_exclusive_open, |
904 | .release = pms_exclusive_release, | 904 | .release = pms_exclusive_release, |
905 | .ioctl = pms_ioctl, | 905 | .ioctl = pms_ioctl, |
906 | #ifdef CONFIG_COMPAT | ||
907 | .compat_ioctl = v4l_compat_ioctl32, | ||
908 | #endif | ||
909 | .read = pms_read, | 906 | .read = pms_read, |
910 | .llseek = no_llseek, | ||
911 | }; | 907 | }; |
912 | 908 | ||
913 | static struct video_device pms_template= | 909 | static struct video_device pms_template= |