]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/usb_hub.c
Prepare v2015.04-rc1
[karo-tx-uboot.git] / common / usb_hub.c
index 0f1eab448649541a45e674bcfbd599460cc89677..66b4a725d1b3c1d2caf0fe005fe40e036b9b251f 100644 (file)
@@ -300,7 +300,8 @@ static int usb_hub_configure(struct usb_device *dev)
        }
        descriptor = (struct usb_hub_descriptor *)buffer;
 
-       length = min(descriptor->bLength, sizeof(struct usb_hub_descriptor));
+       length = min_t(int, descriptor->bLength,
+                      sizeof(struct usb_hub_descriptor));
 
        if (usb_get_hub_descriptor(dev, buffer, length) < 0) {
                debug("usb_hub_configure: failed to get hub " \