ChangeSet 1.1673.8.50, 2004/03/30 14:10:11-08:00, [EMAIL PROTECTED]
[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;
}
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel