diff options
Diffstat (limited to 'drivers/media/video/uvc/uvc_v4l2.c')
-rw-r--r-- | drivers/media/video/uvc/uvc_v4l2.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c index d7bd71be40a9..78e4c4e09d89 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 | ||
401 | static int uvc_v4l2_open(struct inode *inode, struct file *file) | 401 | static 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 | ||
441 | static int uvc_v4l2_release(struct inode *inode, struct file *file) | 439 | static 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"); |
@@ -845,10 +842,6 @@ static int uvc_v4l2_do_ioctl(struct inode *inode, struct file *file, | |||
845 | if (ret < 0) | 842 | if (ret < 0) |
846 | return ret; | 843 | return ret; |
847 | 844 | ||
848 | if (!(video->streaming->cur_format->flags & | ||
849 | UVC_FMT_FLAG_COMPRESSED)) | ||
850 | video->queue.flags |= UVC_QUEUE_DROP_INCOMPLETE; | ||
851 | |||
852 | rb->count = ret; | 845 | rb->count = ret; |
853 | ret = 0; | 846 | ret = 0; |
854 | break; | 847 | break; |
@@ -1031,8 +1024,7 @@ static struct vm_operations_struct uvc_vm_ops = { | |||
1031 | 1024 | ||
1032 | static int uvc_v4l2_mmap(struct file *file, struct vm_area_struct *vma) | 1025 | static int uvc_v4l2_mmap(struct file *file, struct vm_area_struct *vma) |
1033 | { | 1026 | { |
1034 | struct video_device *vdev = video_devdata(file); | 1027 | 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); | 1028 | struct uvc_buffer *uninitialized_var(buffer); |
1037 | struct page *page; | 1029 | struct page *page; |
1038 | unsigned long addr, start, size; | 1030 | unsigned long addr, start, size; |
@@ -1085,8 +1077,7 @@ done: | |||
1085 | 1077 | ||
1086 | static unsigned int uvc_v4l2_poll(struct file *file, poll_table *wait) | 1078 | static unsigned int uvc_v4l2_poll(struct file *file, poll_table *wait) |
1087 | { | 1079 | { |
1088 | struct video_device *vdev = video_devdata(file); | 1080 | struct uvc_video_device *video = video_drvdata(file); |
1089 | struct uvc_video_device *video = video_get_drvdata(vdev); | ||
1090 | 1081 | ||
1091 | uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_poll\n"); | 1082 | uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_poll\n"); |
1092 | 1083 | ||