aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/w9966.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-08-23 06:24:07 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:36:54 -0400
commit601e9444f249d219009ec05674268d90f6f1cdcb (patch)
tree42d58813872e340e03a40b74922ea89dfdcf0c55 /drivers/media/video/w9966.c
parente138c592b50370621653fd962b2bc3f4e25dfe78 (diff)
V4L/DVB (8786): v4l2: remove the priv field, use dev_get_drvdata instead
Remove the priv field and let video_get/set_drvdata use dev_get_drvdata and dev_set_drvdata instead. Convert all drivers that still used priv directly. 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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/w9966.c b/drivers/media/video/w9966.c
index e3580119640f..14ebb15837fb 100644
--- a/drivers/media/video/w9966.c
+++ b/drivers/media/video/w9966.c
@@ -188,7 +188,7 @@ static ssize_t w9966_v4l_read(struct file *file, char __user *buf,
188static int w9966_exclusive_open(struct inode *inode, struct file *file) 188static int w9966_exclusive_open(struct inode *inode, struct file *file)
189{ 189{
190 struct video_device *vdev = video_devdata(file); 190 struct video_device *vdev = video_devdata(file);
191 struct w9966_dev *cam = vdev->priv; 191 struct w9966_dev *cam = video_get_drvdata(vdev);
192 192
193 return test_and_set_bit(0, &cam->in_use) ? -EBUSY : 0; 193 return test_and_set_bit(0, &cam->in_use) ? -EBUSY : 0;
194} 194}
@@ -196,7 +196,7 @@ static int w9966_exclusive_open(struct inode *inode, struct file *file)
196static int w9966_exclusive_release(struct inode *inode, struct file *file) 196static int w9966_exclusive_release(struct inode *inode, struct file *file)
197{ 197{
198 struct video_device *vdev = video_devdata(file); 198 struct video_device *vdev = video_devdata(file);
199 struct w9966_dev *cam = vdev->priv; 199 struct w9966_dev *cam = video_get_drvdata(vdev);
200 200
201 clear_bit(0, &cam->in_use); 201 clear_bit(0, &cam->in_use);
202 return 0; 202 return 0;
@@ -351,7 +351,7 @@ static int w9966_init(struct w9966_dev* cam, struct parport* port)
351 351
352// Fill in the video_device struct and register us to v4l 352// Fill in the video_device struct and register us to v4l
353 memcpy(&cam->vdev, &w9966_template, sizeof(struct video_device)); 353 memcpy(&cam->vdev, &w9966_template, sizeof(struct video_device));
354 cam->vdev.priv = cam; 354 video_set_drvdata(&cam->vdev, cam);
355 355
356 if (video_register_device(&cam->vdev, VFL_TYPE_GRABBER, video_nr) < 0) 356 if (video_register_device(&cam->vdev, VFL_TYPE_GRABBER, video_nr) < 0)
357 return -1; 357 return -1;
@@ -733,7 +733,7 @@ static int w9966_v4l_do_ioctl(struct inode *inode, struct file *file,
733 unsigned int cmd, void *arg) 733 unsigned int cmd, void *arg)
734{ 734{
735 struct video_device *vdev = video_devdata(file); 735 struct video_device *vdev = video_devdata(file);
736 struct w9966_dev *cam = vdev->priv; 736 struct w9966_dev *cam = video_get_drvdata(vdev);
737 737
738 switch(cmd) 738 switch(cmd)
739 { 739 {
@@ -892,7 +892,7 @@ static ssize_t w9966_v4l_read(struct file *file, char __user *buf,
892 size_t count, loff_t *ppos) 892 size_t count, loff_t *ppos)
893{ 893{
894 struct video_device *vdev = video_devdata(file); 894 struct video_device *vdev = video_devdata(file);
895 struct w9966_dev *cam = vdev->priv; 895 struct w9966_dev *cam = video_get_drvdata(vdev);
896 unsigned char addr = 0xa0; // ECP, read, CCD-transfer, 00000 896 unsigned char addr = 0xa0; // ECP, read, CCD-transfer, 00000
897 unsigned char __user *dest = (unsigned char __user *)buf; 897 unsigned char __user *dest = (unsigned char __user *)buf;
898 unsigned long dleft = count; 898 unsigned long dleft = count;