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

[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
parent 0dc316de
......@@ -534,7 +534,10 @@ write_fifo (struct net2280_ep *ep, struct usb_request *req)
}
/* 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 @@ static void handle_ep_small (struct net2280_ep *ep)
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 */
......
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