summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/w9966.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-08-23 08:32:09 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 09:36:54 -0200
commitc170ecf434bceb0e188b14a6deb3bfa3ec9ef699 (patch)
treefa62c2e14adeff72310c9a6b8cba675f3153feed /drivers/media/video/w9966.c
parentbfa8a273bb91078ea193ab94c717889928f3b925 (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.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/w9966.c b/drivers/media/video/w9966.c
index 14ebb15837f..b2dbe48a92b 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,
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;
@@ -732,8 +730,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)
{
@@ -891,8 +888,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;