patch-2.4.9 linux/drivers/usb/usb-uhci.c

Next file: linux/drivers/usb/usb-uhci.h
Previous file: linux/drivers/usb/usb-ohci.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.8/linux/drivers/usb/usb-uhci.c linux/drivers/usb/usb-uhci.c
@@ -2159,11 +2159,15 @@
 	case RH_GET_DESCRIPTOR:
 		switch ((wValue & 0xff00) >> 8) {
 		case (0x01):	/* device descriptor */
-			len = min (leni, min (sizeof (root_hub_dev_des), wLength));
+			len = min(unsigned int, leni,
+				  min(unsigned int,
+				      sizeof (root_hub_dev_des), wLength));
 			memcpy (data, root_hub_dev_des, len);
 			OK (len);
 		case (0x02):	/* configuration descriptor */
-			len = min (leni, min (sizeof (root_hub_config_des), wLength));
+			len = min(unsigned int, leni,
+				  min(unsigned int,
+				      sizeof (root_hub_config_des), wLength));
 			memcpy (data, root_hub_config_des, len);
 			OK (len);
 		case (0x03):	/* string descriptors */
@@ -2171,7 +2175,7 @@
 			        uhci->io_addr, "UHCI",
 				data, wLength);
 			if (len > 0) {
-				OK (min (leni, len));
+				OK(min(int, leni, len));
 			} else 
 				stat = -EPIPE;
 		}
@@ -2179,7 +2183,8 @@
 
 	case RH_GET_DESCRIPTOR | RH_CLASS:
 		root_hub_hub_des[2] = uhci->rh.numports;
-		len = min (leni, min (sizeof (root_hub_hub_des), wLength));
+		len = min(unsigned int, leni,
+			  min(unsigned int, sizeof (root_hub_hub_des), wLength));
 		memcpy (data, root_hub_hub_des, len);
 		OK (len);
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)