aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pwc
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/pwc
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/pwc')
-rw-r--r--drivers/media/video/pwc/pwc-if.c12
-rw-r--r--drivers/media/video/pwc/pwc-v4l.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 9aee7cb6f79a..ab28389b4cda 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -1112,7 +1112,7 @@ static int pwc_video_open(struct inode *inode, struct file *file)
1112 1112
1113 PWC_DEBUG_OPEN(">> video_open called(vdev = 0x%p).\n", vdev); 1113 PWC_DEBUG_OPEN(">> video_open called(vdev = 0x%p).\n", vdev);
1114 1114
1115 pdev = (struct pwc_device *)vdev->priv; 1115 pdev = video_get_drvdata(vdev);
1116 BUG_ON(!pdev); 1116 BUG_ON(!pdev);
1117 if (pdev->vopen) { 1117 if (pdev->vopen) {
1118 PWC_DEBUG_OPEN("I'm busy, someone is using the device.\n"); 1118 PWC_DEBUG_OPEN("I'm busy, someone is using the device.\n");
@@ -1233,7 +1233,7 @@ static int pwc_video_close(struct inode *inode, struct file *file)
1233 PWC_DEBUG_OPEN(">> video_close called(vdev = 0x%p).\n", vdev); 1233 PWC_DEBUG_OPEN(">> video_close called(vdev = 0x%p).\n", vdev);
1234 1234
1235 lock_kernel(); 1235 lock_kernel();
1236 pdev = (struct pwc_device *)vdev->priv; 1236 pdev = video_get_drvdata(vdev);
1237 if (pdev->vopen == 0) 1237 if (pdev->vopen == 0)
1238 PWC_DEBUG_MODULE("video_close() called on closed device?\n"); 1238 PWC_DEBUG_MODULE("video_close() called on closed device?\n");
1239 1239
@@ -1304,7 +1304,7 @@ static ssize_t pwc_video_read(struct file *file, char __user *buf,
1304 vdev, buf, count); 1304 vdev, buf, count);
1305 if (vdev == NULL) 1305 if (vdev == NULL)
1306 return -EFAULT; 1306 return -EFAULT;
1307 pdev = vdev->priv; 1307 pdev = video_get_drvdata(vdev);
1308 if (pdev == NULL) 1308 if (pdev == NULL)
1309 return -EFAULT; 1309 return -EFAULT;
1310 1310
@@ -1386,7 +1386,7 @@ static unsigned int pwc_video_poll(struct file *file, poll_table *wait)
1386 1386
1387 if (vdev == NULL) 1387 if (vdev == NULL)
1388 return -EFAULT; 1388 return -EFAULT;
1389 pdev = vdev->priv; 1389 pdev = video_get_drvdata(vdev);
1390 if (pdev == NULL) 1390 if (pdev == NULL)
1391 return -EFAULT; 1391 return -EFAULT;
1392 1392
@@ -1408,7 +1408,7 @@ static int pwc_video_ioctl(struct inode *inode, struct file *file,
1408 1408
1409 if (!vdev) 1409 if (!vdev)
1410 goto out; 1410 goto out;
1411 pdev = vdev->priv; 1411 pdev = video_get_drvdata(vdev);
1412 1412
1413 mutex_lock(&pdev->modlock); 1413 mutex_lock(&pdev->modlock);
1414 if (!pdev->unplugged) 1414 if (!pdev->unplugged)
@@ -1428,7 +1428,7 @@ static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma)
1428 int index; 1428 int index;
1429 1429
1430 PWC_DEBUG_MEMORY(">> %s\n", __func__); 1430 PWC_DEBUG_MEMORY(">> %s\n", __func__);
1431 pdev = vdev->priv; 1431 pdev = video_get_drvdata(vdev);
1432 size = vma->vm_end - vma->vm_start; 1432 size = vma->vm_end - vma->vm_start;
1433 start = vma->vm_start; 1433 start = vma->vm_start;
1434 1434
diff --git a/drivers/media/video/pwc/pwc-v4l.c b/drivers/media/video/pwc/pwc-v4l.c
index 1742889874df..76a1376c9751 100644
--- a/drivers/media/video/pwc/pwc-v4l.c
+++ b/drivers/media/video/pwc/pwc-v4l.c
@@ -346,7 +346,7 @@ int pwc_video_do_ioctl(struct inode *inode, struct file *file,
346 346
347 if (vdev == NULL) 347 if (vdev == NULL)
348 return -EFAULT; 348 return -EFAULT;
349 pdev = vdev->priv; 349 pdev = video_get_drvdata(vdev);
350 if (pdev == NULL) 350 if (pdev == NULL)
351 return -EFAULT; 351 return -EFAULT;
352 352