]> git.sur5r.net Git - u-boot/blobdiff - drivers/usb/gadget/designware_udc.c
Merge branch 'master' of git://git.denx.de/u-boot-arm
[u-boot] / drivers / usb / gadget / designware_udc.c
index 3559400b284778d838f20cedc9043a29767e26c6..0db7a3b6c15566b65b4d7260603a30c59284b43f 100644 (file)
@@ -269,8 +269,8 @@ static void dw_write_noniso_tx_fifo(struct usb_endpoint_instance
                UDCDBGA("urb->buffer %p, buffer_length %d, actual_length %d",
                        urb->buffer, urb->buffer_length, urb->actual_length);
 
-               last = min(urb->actual_length - endpoint->sent,
-                          endpoint->tx_packetSize);
+               last = min_t(u32, urb->actual_length - endpoint->sent,
+                            endpoint->tx_packetSize);
 
                if (last) {
                        u8 *cp = urb->buffer + endpoint->sent;