ChangeSet 1.1673.8.50, 2004/03/30 14:10:11-08:00, akpm@osdl.org [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 drivers/usb/gadget/epautoconf.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff -Nru a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c --- a/drivers/usb/gadget/epautoconf.c Wed Apr 14 14:35:57 2004 +++ b/drivers/usb/gadget/epautoconf.c Wed Apr 14 14:35:57 2004 @@ -171,9 +171,14 @@ } /* report (variable) full speed bulk maxpacket */ - if (USB_ENDPOINT_XFER_BULK == type) - desc->wMaxPacketSize = cpu_to_le16 ( - min ((unsigned)64, ep->maxpacket)); + if (USB_ENDPOINT_XFER_BULK == type) { + int size = 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; }