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 -puN drivers/usb/gadget/net2280.c~gcc-35-net2280 drivers/usb/gadget/net2280.c
--- 25/drivers/usb/gadget/net2280.c~gcc-35-net2280	2004-01-23 23:05:17.000000000 -0800
+++ 25-akpm/drivers/usb/gadget/net2280.c	2004-01-23 23:06:34.000000000 -0800
@@ -524,7 +524,10 @@ write_fifo (struct net2280_ep *ep, struc
 	}
 
 	/* 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)" : "",
@@ -2039,7 +2042,8 @@ static void handle_ep_small (struct net2
 		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 */

_