aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/uvc
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-08-23 07:32:09 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:36:54 -0400
commitc170ecf434bceb0e188b14a6deb3bfa3ec9ef699 (patch)
treefa62c2e14adeff72310c9a6b8cba675f3153feed /drivers/media/video/uvc
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/uvc')
-rw-r--r--drivers/media/video/uvc/uvc_v4l2.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c
index d7bd71be40a9..d4758c8e13ad 100644
--- a/drivers/media/video/uvc/uvc_v4l2.c
+++ b/drivers/media/video/uvc/uvc_v4l2.c
@@ -400,15 +400,13 @@ static int uvc_has_privileges(struct uvc_fh *handle)
400 400
401static int uvc_v4l2_open(struct inode *inode, struct file *file) 401static int uvc_v4l2_open(struct inode *inode, struct file *file)
402{ 402{
403 struct video_device *vdev;
404 struct uvc_video_device *video; 403 struct uvc_video_device *video;
405 struct uvc_fh *handle; 404 struct uvc_fh *handle;
406 int ret = 0; 405 int ret = 0;
407 406
408 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_open\n"); 407 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_open\n");
409 mutex_lock(&uvc_driver.open_mutex); 408 mutex_lock(&uvc_driver.open_mutex);
410 vdev = video_devdata(file); 409 video = video_drvdata(file);
411 video = video_get_drvdata(vdev);
412 410
413 if (video->dev->state & UVC_DEV_DISCONNECTED) { 411 if (video->dev->state & UVC_DEV_DISCONNECTED) {
414 ret = -ENODEV; 412 ret = -ENODEV;
@@ -440,8 +438,7 @@ done:
440 438
441static int uvc_v4l2_release(struct inode *inode, struct file *file) 439static int uvc_v4l2_release(struct inode *inode, struct file *file)
442{ 440{
443 struct video_device *vdev = video_devdata(file); 441 struct uvc_video_device *video = video_drvdata(file);
444 struct uvc_video_device *video = video_get_drvdata(vdev);
445 struct uvc_fh *handle = (struct uvc_fh *)file->private_data; 442 struct uvc_fh *handle = (struct uvc_fh *)file->private_data;
446 443
447 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_release\n"); 444 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_release\n");
@@ -1031,8 +1028,7 @@ static struct vm_operations_struct uvc_vm_ops = {
1031 1028
1032static int uvc_v4l2_mmap(struct file *file, struct vm_area_struct *vma) 1029static int uvc_v4l2_mmap(struct file *file, struct vm_area_struct *vma)
1033{ 1030{
1034 struct video_device *vdev = video_devdata(file); 1031 struct uvc_video_device *video = video_drvdata(file);
1035 struct uvc_video_device *video = video_get_drvdata(vdev);
1036 struct uvc_buffer *uninitialized_var(buffer); 1032 struct uvc_buffer *uninitialized_var(buffer);
1037 struct page *page; 1033 struct page *page;
1038 unsigned long addr, start, size; 1034 unsigned long addr, start, size;
@@ -1085,8 +1081,7 @@ done:
1085 1081
1086static unsigned int uvc_v4l2_poll(struct file *file, poll_table *wait) 1082static unsigned int uvc_v4l2_poll(struct file *file, poll_table *wait)
1087{ 1083{
1088 struct video_device *vdev = video_devdata(file); 1084 struct uvc_video_device *video = video_drvdata(file);
1089 struct uvc_video_device *video = video_get_drvdata(vdev);
1090 1085
1091 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_poll\n"); 1086 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_poll\n");
1092 1087