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/pwc/pwc-if.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/pwc/pwc-if.c')
-rw-r--r-- | drivers/media/video/pwc/pwc-if.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index 1ce9da167b7e..315337bfd673 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c | |||
@@ -142,16 +142,16 @@ static struct { | |||
142 | 142 | ||
143 | /***/ | 143 | /***/ |
144 | 144 | ||
145 | static int pwc_video_open(struct inode *inode, struct file *file); | 145 | static int pwc_video_open(struct file *file); |
146 | static int pwc_video_close(struct inode *inode, struct file *file); | 146 | static int pwc_video_close(struct file *file); |
147 | static ssize_t pwc_video_read(struct file *file, char __user *buf, | 147 | static ssize_t pwc_video_read(struct file *file, char __user *buf, |
148 | size_t count, loff_t *ppos); | 148 | size_t count, loff_t *ppos); |
149 | static unsigned int pwc_video_poll(struct file *file, poll_table *wait); | 149 | static unsigned int pwc_video_poll(struct file *file, poll_table *wait); |
150 | static int pwc_video_ioctl(struct inode *inode, struct file *file, | 150 | static int pwc_video_ioctl(struct file *file, |
151 | unsigned int ioctlnr, unsigned long arg); | 151 | unsigned int ioctlnr, unsigned long arg); |
152 | static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma); | 152 | static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma); |
153 | 153 | ||
154 | static const struct file_operations pwc_fops = { | 154 | static const struct v4l2_file_operations pwc_fops = { |
155 | .owner = THIS_MODULE, | 155 | .owner = THIS_MODULE, |
156 | .open = pwc_video_open, | 156 | .open = pwc_video_open, |
157 | .release = pwc_video_close, | 157 | .release = pwc_video_close, |
@@ -159,10 +159,6 @@ static const struct file_operations pwc_fops = { | |||
159 | .poll = pwc_video_poll, | 159 | .poll = pwc_video_poll, |
160 | .mmap = pwc_video_mmap, | 160 | .mmap = pwc_video_mmap, |
161 | .ioctl = pwc_video_ioctl, | 161 | .ioctl = pwc_video_ioctl, |
162 | #ifdef CONFIG_COMPAT | ||
163 | .compat_ioctl = v4l_compat_ioctl32, | ||
164 | #endif | ||
165 | .llseek = no_llseek, | ||
166 | }; | 162 | }; |
167 | static struct video_device pwc_template = { | 163 | static struct video_device pwc_template = { |
168 | .name = "Philips Webcam", /* Filled in later */ | 164 | .name = "Philips Webcam", /* Filled in later */ |
@@ -1104,7 +1100,7 @@ static const char *pwc_sensor_type_to_string(unsigned int sensor_type) | |||
1104 | /***************************************************************************/ | 1100 | /***************************************************************************/ |
1105 | /* Video4Linux functions */ | 1101 | /* Video4Linux functions */ |
1106 | 1102 | ||
1107 | static int pwc_video_open(struct inode *inode, struct file *file) | 1103 | static int pwc_video_open(struct file *file) |
1108 | { | 1104 | { |
1109 | int i, ret; | 1105 | int i, ret; |
1110 | struct video_device *vdev = video_devdata(file); | 1106 | struct video_device *vdev = video_devdata(file); |
@@ -1224,7 +1220,7 @@ static void pwc_cleanup(struct pwc_device *pdev) | |||
1224 | } | 1220 | } |
1225 | 1221 | ||
1226 | /* Note that all cleanup is done in the reverse order as in _open */ | 1222 | /* Note that all cleanup is done in the reverse order as in _open */ |
1227 | static int pwc_video_close(struct inode *inode, struct file *file) | 1223 | static int pwc_video_close(struct file *file) |
1228 | { | 1224 | { |
1229 | struct video_device *vdev = file->private_data; | 1225 | struct video_device *vdev = file->private_data; |
1230 | struct pwc_device *pdev; | 1226 | struct pwc_device *pdev; |
@@ -1399,7 +1395,7 @@ static unsigned int pwc_video_poll(struct file *file, poll_table *wait) | |||
1399 | return 0; | 1395 | return 0; |
1400 | } | 1396 | } |
1401 | 1397 | ||
1402 | static int pwc_video_ioctl(struct inode *inode, struct file *file, | 1398 | static int pwc_video_ioctl(struct file *file, |
1403 | unsigned int cmd, unsigned long arg) | 1399 | unsigned int cmd, unsigned long arg) |
1404 | { | 1400 | { |
1405 | struct video_device *vdev = file->private_data; | 1401 | struct video_device *vdev = file->private_data; |