]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/usb/host/dwc2.c
linux/kernel.h: sync min, max, min3, max3 macros with Linux
[karo-tx-uboot.git] / drivers / usb / host / dwc2.c
index 2a5bbf5ac0e9be839f19a7cb7149927e0e9a1f30..e8142ac0922f1974c2b36c00de24eaa223d11215 100644 (file)
@@ -503,23 +503,23 @@ static int dwc_otg_submit_rh_msg_in_descriptor(struct usb_device *dev,
        case 0:
                switch (wValue & 0xff00) {
                case 0x0100:    /* device descriptor */
-                       len = min3(txlen, sizeof(root_hub_dev_des), wLength);
+                       len = min3(txlen, (int)sizeof(root_hub_dev_des), (int)wLength);
                        memcpy(buffer, root_hub_dev_des, len);
                        break;
                case 0x0200:    /* configuration descriptor */
-                       len = min3(txlen, sizeof(root_hub_config_des), wLength);
+                       len = min3(txlen, (int)sizeof(root_hub_config_des), (int)wLength);
                        memcpy(buffer, root_hub_config_des, len);
                        break;
                case 0x0300:    /* string descriptors */
                        switch (wValue & 0xff) {
                        case 0x00:
-                               len = min3(txlen, sizeof(root_hub_str_index0),
-                                          wLength);
+                               len = min3(txlen, (int)sizeof(root_hub_str_index0),
+                                          (int)wLength);
                                memcpy(buffer, root_hub_str_index0, len);
                                break;
                        case 0x01:
-                               len = min3(txlen, sizeof(root_hub_str_index1),
-                                          wLength);
+                               len = min3(txlen, (int)sizeof(root_hub_str_index1),
+                                          (int)wLength);
                                memcpy(buffer, root_hub_str_index1, len);
                                break;
                        }
@@ -556,7 +556,7 @@ static int dwc_otg_submit_rh_msg_in_descriptor(struct usb_device *dev,
                        data[10] = data[9];
                }
 
-               len = min3(txlen, data[0], wLength);
+               len = min3(txlen, (int)data[0], (int)wLength);
                memcpy(buffer, data, len);
                break;
        default: