Commit cf2bbebe authored by Andrew Morton's avatar Andrew Morton Committed by Greg Kroah-Hartman

[PATCH] USB: drivers/usb/gadget/epautoconf.c gcc-3.5 build fix

drivers/usb/gadget/epautoconf.c: In function `ep_matches':
drivers/usb/gadget/epautoconf.c:175: error: `typeof' applied to a bit-field
parent 10766dde
...@@ -171,9 +171,14 @@ ep_matches ( ...@@ -171,9 +171,14 @@ ep_matches (
} }
/* report (variable) full speed bulk maxpacket */ /* report (variable) full speed bulk maxpacket */
if (USB_ENDPOINT_XFER_BULK == type) if (USB_ENDPOINT_XFER_BULK == type) {
desc->wMaxPacketSize = cpu_to_le16 ( int size = ep->maxpacket;
min ((unsigned)64, ep->maxpacket));
/* min() doesn't work on bitfields with gcc-3.5 */
if (size > 64)
size = 64;
desc->wMaxPacketSize = cpu_to_le16(size);
}
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment