From: Laurent Pinchart Date: Tue, 18 Feb 2014 13:02:50 +0000 (-0300) Subject: upstream: [media] uvcvideo: Remove duplicate check for number of buffers in queue_setup X-Git-Tag: submit/tizen/20141121.110247~1445 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a32373ad38a7ff0e3508b85b34e7aa0659b88a67;p=platform%2Fkernel%2Flinux-3.10.git upstream: [media] uvcvideo: Remove duplicate check for number of buffers in queue_setup videobuf2 already ensures that the number of buffers will not exceed VIDEO_MAX_FRAME, which is equal to our arbitraty limit of UVC_MAX_VIDEO_BUFFERS. Remove the duplicate check. Signed-off-by: Laurent Pinchart Tested-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c index cd962be..254bc34 100644 --- a/drivers/media/usb/uvc/uvc_queue.c +++ b/drivers/media/usb/uvc/uvc_queue.c @@ -48,9 +48,6 @@ static int uvc_queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, struct uvc_streaming *stream = container_of(queue, struct uvc_streaming, queue); - if (*nbuffers > UVC_MAX_VIDEO_BUFFERS) - *nbuffers = UVC_MAX_VIDEO_BUFFERS; - *nplanes = 1; sizes[0] = stream->ctrl.dwMaxVideoFrameSize; diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h index 9e35982..6173632 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -115,8 +115,6 @@ #define UVC_URBS 5 /* Maximum number of packets per URB. */ #define UVC_MAX_PACKETS 32 -/* Maximum number of video buffers. */ -#define UVC_MAX_VIDEO_BUFFERS 32 /* Maximum status buffer size in bytes of interrupt URB. */ #define UVC_MAX_STATUS_SIZE 16