aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-02-18 08:02:50 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-02-28 11:22:27 -0500
commitccc135c380338ccc6643f6dd7f16000ae7384a13 (patch)
treef76b672ab106adb264975a7b92a18b1d2435ed2e /drivers/media/usb
parent79af67e77f86404e77e65ad954bfe5030db2ca02 (diff)
[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 <laurent.pinchart@ideasonboard.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r--drivers/media/usb/uvc/uvc_queue.c3
-rw-r--r--drivers/media/usb/uvc/uvcvideo.h2
2 files changed, 0 insertions, 5 deletions
diff --git a/drivers/media/usb/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c
index cd962be860ca..254bc346243e 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,
48 struct uvc_streaming *stream = 48 struct uvc_streaming *stream =
49 container_of(queue, struct uvc_streaming, queue); 49 container_of(queue, struct uvc_streaming, queue);
50 50
51 if (*nbuffers > UVC_MAX_VIDEO_BUFFERS)
52 *nbuffers = UVC_MAX_VIDEO_BUFFERS;
53
54 *nplanes = 1; 51 *nplanes = 1;
55 52
56 sizes[0] = stream->ctrl.dwMaxVideoFrameSize; 53 sizes[0] = stream->ctrl.dwMaxVideoFrameSize;
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 9e35982d099a..61736324488b 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -115,8 +115,6 @@
115#define UVC_URBS 5 115#define UVC_URBS 5
116/* Maximum number of packets per URB. */ 116/* Maximum number of packets per URB. */
117#define UVC_MAX_PACKETS 32 117#define UVC_MAX_PACKETS 32
118/* Maximum number of video buffers. */
119#define UVC_MAX_VIDEO_BUFFERS 32
120/* Maximum status buffer size in bytes of interrupt URB. */ 118/* Maximum status buffer size in bytes of interrupt URB. */
121#define UVC_MAX_STATUS_SIZE 16 119#define UVC_MAX_STATUS_SIZE 16
122 120