ChangeSet 1.1500.8.1, 2004/01/29 16:03:40-08:00, [EMAIL PROTECTED]
[PATCH] USB: gcc-3.5: drivers/usb/gadget/net2280.c
drivers/usb/gadget/net2280.c: In function `write_fifo':
drivers/usb/gadget/net2280.c:527: error: `typeof' applied to a bit-field
drivers/usb/gadget/net2280.c: In function `handle_ep_small':
drivers/usb/gadget/net2280.c:2042: error: `typeof' applied to a bit-field
drivers/usb/gadget/net2280.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff -Nru a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
--- a/drivers/usb/gadget/net2280.c Mon Feb 9 14:43:12 2004
+++ b/drivers/usb/gadget/net2280.c Mon Feb 9 14:43:12 2004
@@ -534,7 +534,10 @@
}
/* write just one packet at a time */
- count = min (ep->ep.maxpacket, total);
+ count = ep->ep.maxpacket;
+ if (count > total) /* min() cannot be used on a bitfield */
+ count = total;
+
VDEBUG (ep->dev, "write %s fifo (IN) %d bytes%s req %p\n",
ep->ep.name, count,
(count != ep->ep.maxpacket) ? " (short)" : "",
@@ -2197,7 +2200,8 @@
unsigned len;
len = req->req.length - req->req.actual;
- len = min (ep->ep.maxpacket, len);
+ if (len > ep->ep.maxpacket)
+ len = ep->ep.maxpacket;
req->req.actual += len;
/* if we wrote it all, we're usually done */
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel