]> git.sur5r.net Git - u-boot/blobdiff - drivers/usb/gadget/pxa27x_udc.c
ci_udc: Update the ci_udc driver to support bulk transfers
[u-boot] / drivers / usb / gadget / pxa27x_udc.c
index 05d1b566674d101125d3006b0bd741fe57070e06..942355528084b0022c475b5e35d3b136f6957e2c 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
 #include <usb/pxa27x_udc.h>
+#include <usb/udc.h>
 
 #include "ep0.h"
 
@@ -64,7 +65,8 @@ static int udc_write_urb(struct usb_endpoint_instance *endpoint)
        if (!urb || !urb->actual_length)
                return -1;
 
-       n = MIN(urb->actual_length - endpoint->sent, endpoint->tx_packetSize);
+       n = min_t(unsigned int, urb->actual_length - endpoint->sent,
+                 endpoint->tx_packetSize);
        if (n <= 0)
                return -1;