From db7a0542d2c05792f43c96907b91b938179f07b2 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 23 Aug 2008 13:32:09 +0200 Subject: v4l: replace video_get_drvdata(video_devdata(filp)) with video_drvdata(filp) From: Hans Verkuil Use the new video_drvdata(filp) function where it is safe to do so. Priority: normal Signed-off-by: Hans Verkuil --- linux/drivers/media/video/w9966.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'linux/drivers/media/video/w9966.c') diff --git a/linux/drivers/media/video/w9966.c b/linux/drivers/media/video/w9966.c index 1dd7d81d4..f3f28c232 100644 --- a/linux/drivers/media/video/w9966.c +++ b/linux/drivers/media/video/w9966.c @@ -188,16 +188,14 @@ static ssize_t w9966_v4l_read(struct file *file, char __user *buf, static int w9966_exclusive_open(struct inode *inode, struct file *file) { - struct video_device *vdev = video_devdata(file); - struct w9966_dev *cam = video_get_drvdata(vdev); + struct w9966_dev *cam = video_drvdata(file); return test_and_set_bit(0, &cam->in_use) ? -EBUSY : 0; } static int w9966_exclusive_release(struct inode *inode, struct file *file) { - struct video_device *vdev = video_devdata(file); - struct w9966_dev *cam = video_get_drvdata(vdev); + struct w9966_dev *cam = video_drvdata(file); clear_bit(0, &cam->in_use); return 0; @@ -733,8 +731,7 @@ static int w9966_wReg_i2c(struct w9966_dev* cam, int reg, int data) static int w9966_v4l_do_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *arg) { - struct video_device *vdev = video_devdata(file); - struct w9966_dev *cam = video_get_drvdata(vdev); + struct w9966_dev *cam = video_drvdata(file); switch(cmd) { @@ -892,8 +889,7 @@ static int w9966_v4l_ioctl(struct inode *inode, struct file *file, static ssize_t w9966_v4l_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { - struct video_device *vdev = video_devdata(file); - struct w9966_dev *cam = video_get_drvdata(vdev); + struct w9966_dev *cam = video_drvdata(file); unsigned char addr = 0xa0; // ECP, read, CCD-transfer, 00000 unsigned char __user *dest = (unsigned char __user *)buf; unsigned long dleft = count; -- cgit v1.2.3