diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-08-23 07:32:09 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:36:54 -0400 |
commit | c170ecf434bceb0e188b14a6deb3bfa3ec9ef699 (patch) | |
tree | fa62c2e14adeff72310c9a6b8cba675f3153feed /drivers/media/video/w9966.c | |
parent | bfa8a273bb91078ea193ab94c717889928f3b925 (diff) |
V4L/DVB (8788): v4l: replace video_get_drvdata(video_devdata(filp)) with video_drvdata(filp)
Use the new video_drvdata(filp) function where it is safe to do so.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/w9966.c')
-rw-r--r-- | drivers/media/video/w9966.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/w9966.c b/drivers/media/video/w9966.c index 14ebb15837fb..b2dbe48a92bb 100644 --- a/drivers/media/video/w9966.c +++ b/drivers/media/video/w9966.c | |||
@@ -187,16 +187,14 @@ static ssize_t w9966_v4l_read(struct file *file, char __user *buf, | |||
187 | 187 | ||
188 | static int w9966_exclusive_open(struct inode *inode, struct file *file) | 188 | static int w9966_exclusive_open(struct inode *inode, struct file *file) |
189 | { | 189 | { |
190 | struct video_device *vdev = video_devdata(file); | 190 | struct w9966_dev *cam = video_drvdata(file); |
191 | struct w9966_dev *cam = video_get_drvdata(vdev); | ||
192 | 191 | ||
193 | return test_and_set_bit(0, &cam->in_use) ? -EBUSY : 0; | 192 | return test_and_set_bit(0, &cam->in_use) ? -EBUSY : 0; |
194 | } | 193 | } |
195 | 194 | ||
196 | static int w9966_exclusive_release(struct inode *inode, struct file *file) | 195 | static int w9966_exclusive_release(struct inode *inode, struct file *file) |
197 | { | 196 | { |
198 | struct video_device *vdev = video_devdata(file); | 197 | struct w9966_dev *cam = video_drvdata(file); |
199 | struct w9966_dev *cam = video_get_drvdata(vdev); | ||
200 | 198 | ||
201 | clear_bit(0, &cam->in_use); | 199 | clear_bit(0, &cam->in_use); |
202 | return 0; | 200 | return 0; |
@@ -732,8 +730,7 @@ static int w9966_wReg_i2c(struct w9966_dev* cam, int reg, int data) | |||
732 | static int w9966_v4l_do_ioctl(struct inode *inode, struct file *file, | 730 | static int w9966_v4l_do_ioctl(struct inode *inode, struct file *file, |
733 | unsigned int cmd, void *arg) | 731 | unsigned int cmd, void *arg) |
734 | { | 732 | { |
735 | struct video_device *vdev = video_devdata(file); | 733 | struct w9966_dev *cam = video_drvdata(file); |
736 | struct w9966_dev *cam = video_get_drvdata(vdev); | ||
737 | 734 | ||
738 | switch(cmd) | 735 | switch(cmd) |
739 | { | 736 | { |
@@ -891,8 +888,7 @@ static int w9966_v4l_ioctl(struct inode *inode, struct file *file, | |||
891 | static ssize_t w9966_v4l_read(struct file *file, char __user *buf, | 888 | static ssize_t w9966_v4l_read(struct file *file, char __user *buf, |
892 | size_t count, loff_t *ppos) | 889 | size_t count, loff_t *ppos) |
893 | { | 890 | { |
894 | struct video_device *vdev = video_devdata(file); | 891 | struct w9966_dev *cam = video_drvdata(file); |
895 | struct w9966_dev *cam = video_get_drvdata(vdev); | ||
896 | unsigned char addr = 0xa0; // ECP, read, CCD-transfer, 00000 | 892 | unsigned char addr = 0xa0; // ECP, read, CCD-transfer, 00000 |
897 | unsigned char __user *dest = (unsigned char __user *)buf; | 893 | unsigned char __user *dest = (unsigned char __user *)buf; |
898 | unsigned long dleft = count; | 894 | unsigned long dleft = count; |