aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/gspca.c
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2010-04-29 05:01:53 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:58:45 -0400
commitb26d6e21788864039bfb24840a668f2cb0848930 (patch)
treef2deb4128695d3ec62528b59403bb63ceb74b4c4 /drivers/media/video/gspca/gspca.c
parent57c6d2e999e37bd8e98820666278f2b670a9bbab (diff)
V4L/DVB: gspca - main: Convert wMaxPacketSize from little endian 16 to cpu
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/gspca.c')
-rw-r--r--drivers/media/video/gspca/gspca.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index e8d08f887957..efe615938783 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -199,7 +199,7 @@ static int alloc_and_submit_int_urb(struct gspca_dev *gspca_dev,
199 void *buffer = NULL; 199 void *buffer = NULL;
200 int ret = -EINVAL; 200 int ret = -EINVAL;
201 201
202 buffer_len = ep->wMaxPacketSize; 202 buffer_len = le16_to_cpu(ep->wMaxPacketSize);
203 interval = ep->bInterval; 203 interval = ep->bInterval;
204 PDEBUG(D_PROBE, "found int in endpoint: 0x%x, " 204 PDEBUG(D_PROBE, "found int in endpoint: 0x%x, "
205 "buffer_len=%u, interval=%u", 205 "buffer_len=%u, interval=%u",
@@ -213,7 +213,7 @@ static int alloc_and_submit_int_urb(struct gspca_dev *gspca_dev,
213 goto error; 213 goto error;
214 } 214 }
215 215
216 buffer = usb_buffer_alloc(dev, ep->wMaxPacketSize, 216 buffer = usb_buffer_alloc(dev, buffer_len,
217 GFP_KERNEL, &urb->transfer_dma); 217 GFP_KERNEL, &urb->transfer_dma);
218 if (!buffer) { 218 if (!buffer) {
219 ret = -ENOMEM; 219 ret = -ENOMEM;