aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-11-25 14:34:07 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-10-23 15:26:51 +0200
commit8468e866cf89d86df6365e4592fc23b8110ad87b (patch)
tree4dc27a12d2076396341e81a93c81a562c1ef5059
parentd7d8c88ff7b4a14bb4918b0ebc5e6554ee83b7ca (diff)
uvcvideo: Allow single packet per URB
There's no reason to disallow isochronous URBs with a single packet. Lift the limitation by fixing the number of packets check. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--drivers/media/usb/uvc/uvc_video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index 3394c3432011..b9b6004ddc83 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -1384,7 +1384,7 @@ static int uvc_alloc_urb_buffers(struct uvc_streaming *stream,
npackets = UVC_MAX_PACKETS;
/* Retry allocations until one succeed. */
- for (; npackets > 1; npackets /= 2) {
+ for (; npackets > 0; npackets /= 2) {
for (i = 0; i < UVC_URBS; ++i) {
stream->urb_size = psize * npackets;
#ifndef CONFIG_DMA_NONCOHERENT

Privacy Policy