diff options
Diffstat (limited to 'drivers/media/video/w9966.c')
-rw-r--r-- | drivers/media/video/w9966.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/media/video/w9966.c b/drivers/media/video/w9966.c index 56c570c267ea..91500f57442a 100644 --- a/drivers/media/video/w9966.c +++ b/drivers/media/video/w9966.c | |||
@@ -180,19 +180,19 @@ static int w9966_i2c_wbyte(struct w9966_dev* cam, int data); | |||
180 | static int w9966_i2c_rbyte(struct w9966_dev* cam); | 180 | static int w9966_i2c_rbyte(struct w9966_dev* cam); |
181 | #endif | 181 | #endif |
182 | 182 | ||
183 | static int w9966_v4l_ioctl(struct inode *inode, struct file *file, | 183 | static int w9966_v4l_ioctl(struct file *file, |
184 | unsigned int cmd, unsigned long arg); | 184 | unsigned int cmd, unsigned long arg); |
185 | static ssize_t w9966_v4l_read(struct file *file, char __user *buf, | 185 | static ssize_t w9966_v4l_read(struct file *file, char __user *buf, |
186 | size_t count, loff_t *ppos); | 186 | size_t count, loff_t *ppos); |
187 | 187 | ||
188 | static int w9966_exclusive_open(struct inode *inode, struct file *file) | 188 | static int w9966_exclusive_open(struct file *file) |
189 | { | 189 | { |
190 | struct w9966_dev *cam = video_drvdata(file); | 190 | struct w9966_dev *cam = video_drvdata(file); |
191 | 191 | ||
192 | return test_and_set_bit(0, &cam->in_use) ? -EBUSY : 0; | 192 | return test_and_set_bit(0, &cam->in_use) ? -EBUSY : 0; |
193 | } | 193 | } |
194 | 194 | ||
195 | static int w9966_exclusive_release(struct inode *inode, struct file *file) | 195 | static int w9966_exclusive_release(struct file *file) |
196 | { | 196 | { |
197 | struct w9966_dev *cam = video_drvdata(file); | 197 | struct w9966_dev *cam = video_drvdata(file); |
198 | 198 | ||
@@ -200,16 +200,12 @@ static int w9966_exclusive_release(struct inode *inode, struct file *file) | |||
200 | return 0; | 200 | return 0; |
201 | } | 201 | } |
202 | 202 | ||
203 | static const struct file_operations w9966_fops = { | 203 | static const struct v4l2_file_operations w9966_fops = { |
204 | .owner = THIS_MODULE, | 204 | .owner = THIS_MODULE, |
205 | .open = w9966_exclusive_open, | 205 | .open = w9966_exclusive_open, |
206 | .release = w9966_exclusive_release, | 206 | .release = w9966_exclusive_release, |
207 | .ioctl = w9966_v4l_ioctl, | 207 | .ioctl = w9966_v4l_ioctl, |
208 | #ifdef CONFIG_COMPAT | ||
209 | .compat_ioctl = v4l_compat_ioctl32, | ||
210 | #endif | ||
211 | .read = w9966_v4l_read, | 208 | .read = w9966_v4l_read, |
212 | .llseek = no_llseek, | ||
213 | }; | 209 | }; |
214 | static struct video_device w9966_template = { | 210 | static struct video_device w9966_template = { |
215 | .name = W9966_DRIVERNAME, | 211 | .name = W9966_DRIVERNAME, |
@@ -877,7 +873,7 @@ static int w9966_v4l_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
877 | return 0; | 873 | return 0; |
878 | } | 874 | } |
879 | 875 | ||
880 | static int w9966_v4l_ioctl(struct inode *inode, struct file *file, | 876 | static int w9966_v4l_ioctl(struct file *file, |
881 | unsigned int cmd, unsigned long arg) | 877 | unsigned int cmd, unsigned long arg) |
882 | { | 878 | { |
883 | return video_usercopy(file, cmd, arg, w9966_v4l_do_ioctl); | 879 | return video_usercopy(file, cmd, arg, w9966_v4l_do_ioctl); |