diff options
Diffstat (limited to 'drivers/media/video/usbvision')
-rw-r--r-- | drivers/media/video/usbvision/usbvision-video.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c index 74a7652dee43..fa62a2fd7b22 100644 --- a/drivers/media/video/usbvision/usbvision-video.c +++ b/drivers/media/video/usbvision/usbvision-video.c | |||
@@ -757,8 +757,7 @@ static int vidioc_reqbufs (struct file *file, | |||
757 | 757 | ||
758 | /* Check input validity: | 758 | /* Check input validity: |
759 | the user must do a VIDEO CAPTURE and MMAP method. */ | 759 | the user must do a VIDEO CAPTURE and MMAP method. */ |
760 | if((vr->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) || | 760 | if (vr->memory != V4L2_MEMORY_MMAP) |
761 | (vr->memory != V4L2_MEMORY_MMAP)) | ||
762 | return -EINVAL; | 761 | return -EINVAL; |
763 | 762 | ||
764 | if(usbvision->streaming == Stream_On) { | 763 | if(usbvision->streaming == Stream_On) { |
@@ -816,9 +815,6 @@ static int vidioc_qbuf (struct file *file, void *priv, struct v4l2_buffer *vb) | |||
816 | unsigned long lock_flags; | 815 | unsigned long lock_flags; |
817 | 816 | ||
818 | /* FIXME : works only on VIDEO_CAPTURE MODE, MMAP. */ | 817 | /* FIXME : works only on VIDEO_CAPTURE MODE, MMAP. */ |
819 | if(vb->type != V4L2_CAP_VIDEO_CAPTURE) { | ||
820 | return -EINVAL; | ||
821 | } | ||
822 | if(vb->index>=usbvision->num_frames) { | 818 | if(vb->index>=usbvision->num_frames) { |
823 | return -EINVAL; | 819 | return -EINVAL; |
824 | } | 820 | } |
@@ -853,9 +849,6 @@ static int vidioc_dqbuf (struct file *file, void *priv, struct v4l2_buffer *vb) | |||
853 | struct usbvision_frame *f; | 849 | struct usbvision_frame *f; |
854 | unsigned long lock_flags; | 850 | unsigned long lock_flags; |
855 | 851 | ||
856 | if (vb->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | ||
857 | return -EINVAL; | ||
858 | |||
859 | if (list_empty(&(usbvision->outqueue))) { | 852 | if (list_empty(&(usbvision->outqueue))) { |
860 | if (usbvision->streaming == Stream_Idle) | 853 | if (usbvision->streaming == Stream_Idle) |
861 | return -EINVAL; | 854 | return -EINVAL; |
@@ -921,7 +914,6 @@ static int vidioc_enum_fmt_vid_cap (struct file *file, void *priv, | |||
921 | if(vfd->index>=USBVISION_SUPPORTED_PALETTES-1) { | 914 | if(vfd->index>=USBVISION_SUPPORTED_PALETTES-1) { |
922 | return -EINVAL; | 915 | return -EINVAL; |
923 | } | 916 | } |
924 | vfd->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | ||
925 | strcpy(vfd->description,usbvision_v4l2_format[vfd->index].desc); | 917 | strcpy(vfd->description,usbvision_v4l2_format[vfd->index].desc); |
926 | vfd->pixelformat = usbvision_v4l2_format[vfd->index].format; | 918 | vfd->pixelformat = usbvision_v4l2_format[vfd->index].format; |
927 | return 0; | 919 | return 0; |