aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cpia.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/cpia.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/cpia.c')
-rw-r--r--drivers/media/video/cpia.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c
index c0600fdbfc6f..b14c59c281eb 100644
--- a/drivers/media/video/cpia.c
+++ b/drivers/media/video/cpia.c
@@ -3155,7 +3155,7 @@ static void put_cam(struct cpia_camera_ops* ops)
3155static int cpia_open(struct inode *inode, struct file *file) 3155static int cpia_open(struct inode *inode, struct file *file)
3156{ 3156{
3157 struct video_device *dev = video_devdata(file); 3157 struct video_device *dev = video_devdata(file);
3158 struct cam_data *cam = dev->priv; 3158 struct cam_data *cam = video_get_drvdata(dev);
3159 int err; 3159 int err;
3160 3160
3161 if (!cam) { 3161 if (!cam) {
@@ -3232,7 +3232,7 @@ static int cpia_open(struct inode *inode, struct file *file)
3232static int cpia_close(struct inode *inode, struct file *file) 3232static int cpia_close(struct inode *inode, struct file *file)
3233{ 3233{
3234 struct video_device *dev = file->private_data; 3234 struct video_device *dev = file->private_data;
3235 struct cam_data *cam = dev->priv; 3235 struct cam_data *cam = video_get_drvdata(dev);
3236 3236
3237 if (cam->ops) { 3237 if (cam->ops) {
3238 /* Return ownership of /proc/cpia/videoX to root */ 3238 /* Return ownership of /proc/cpia/videoX to root */
@@ -3284,7 +3284,7 @@ static ssize_t cpia_read(struct file *file, char __user *buf,
3284 size_t count, loff_t *ppos) 3284 size_t count, loff_t *ppos)
3285{ 3285{
3286 struct video_device *dev = file->private_data; 3286 struct video_device *dev = file->private_data;
3287 struct cam_data *cam = dev->priv; 3287 struct cam_data *cam = video_get_drvdata(dev);
3288 int err; 3288 int err;
3289 3289
3290 /* make this _really_ smp and multithread-safe */ 3290 /* make this _really_ smp and multithread-safe */
@@ -3341,7 +3341,7 @@ static int cpia_do_ioctl(struct inode *inode, struct file *file,
3341 unsigned int ioctlnr, void *arg) 3341 unsigned int ioctlnr, void *arg)
3342{ 3342{
3343 struct video_device *dev = file->private_data; 3343 struct video_device *dev = file->private_data;
3344 struct cam_data *cam = dev->priv; 3344 struct cam_data *cam = video_get_drvdata(dev);
3345 int retval = 0; 3345 int retval = 0;
3346 3346
3347 if (!cam || !cam->ops) 3347 if (!cam || !cam->ops)
@@ -3739,7 +3739,7 @@ static int cpia_mmap(struct file *file, struct vm_area_struct *vma)
3739 unsigned long start = vma->vm_start; 3739 unsigned long start = vma->vm_start;
3740 unsigned long size = vma->vm_end - vma->vm_start; 3740 unsigned long size = vma->vm_end - vma->vm_start;
3741 unsigned long page, pos; 3741 unsigned long page, pos;
3742 struct cam_data *cam = dev->priv; 3742 struct cam_data *cam = video_get_drvdata(dev);
3743 int retval; 3743 int retval;
3744 3744
3745 if (!cam || !cam->ops) 3745 if (!cam || !cam->ops)
@@ -3929,7 +3929,7 @@ static void init_camera_struct(struct cam_data *cam,
3929 cam->proc_entry = NULL; 3929 cam->proc_entry = NULL;
3930 3930
3931 memcpy(&cam->vdev, &cpia_template, sizeof(cpia_template)); 3931 memcpy(&cam->vdev, &cpia_template, sizeof(cpia_template));
3932 cam->vdev.priv = cam; 3932 video_set_drvdata(&cam->vdev, cam);
3933 3933
3934 cam->curframe = 0; 3934 cam->curframe = 0;
3935 for (i = 0; i < FRAME_NUM; i++) { 3935 for (i = 0; i < FRAME_NUM; i++) {