X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fusb%2Fgadget%2Fdesignware_udc.c;h=0db7a3b6c15566b65b4d7260603a30c59284b43f;hb=4608f37918e5d93d6b2b6909b325a5e6fb0a2346;hp=b7c10384a33e968cfc50d751061f2c84b98208d9;hpb=85b8c5c4bf80025de4632ae6c9a8a606e51508a4;p=u-boot diff --git a/drivers/usb/gadget/designware_udc.c b/drivers/usb/gadget/designware_udc.c index b7c10384a3..0db7a3b6c1 100644 --- a/drivers/usb/gadget/designware_udc.c +++ b/drivers/usb/gadget/designware_udc.c @@ -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; @@ -285,7 +285,7 @@ static void dw_write_noniso_tx_fifo(struct usb_endpoint_instance align = ((ulong)cp % sizeof(int)); if (align) - last = MIN(last, sizeof(int) - align); + last = min(last, sizeof(int) - align); UDCDBGA("endpoint->sent %d, tx_packetSize %d, last %d", endpoint->sent, endpoint->tx_packetSize, last);