From: Alex Elder Date: Wed, 12 Nov 2014 21:17:50 +0000 (-0600) Subject: greybus: don't assume PAGE_SIZE for URB size X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1922 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3e9cb4a11831e8c0bf91cd880845b6b35051a484;p=karo-tx-linux.git greybus: don't assume PAGE_SIZE for URB size The buffers allocated for CPort URBS are ES1_GBUF_MSG_SIZE bytes. But usb_fill_bulk_urb() passes PAGE_SIZE as its size. They happen to be the same, but the code is wrong, so fix it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/es1-ap-usb.c b/drivers/staging/greybus/es1-ap-usb.c index 645edbda11d0..f82f665261b2 100644 --- a/drivers/staging/greybus/es1-ap-usb.c +++ b/drivers/staging/greybus/es1-ap-usb.c @@ -546,7 +546,8 @@ static int ap_probe(struct usb_interface *interface, usb_fill_bulk_urb(urb, udev, usb_rcvbulkpipe(udev, es1->cport_in_endpoint), - buffer, PAGE_SIZE, cport_in_callback, es1); + buffer, ES1_GBUF_MSG_SIZE, cport_in_callback, + es1); es1->cport_in_urb[i] = urb; es1->cport_in_buffer[i] = buffer; retval = usb_submit_urb(urb, GFP_KERNEL);