patch-2.4.9 linux/drivers/usb/uhci.c
Next file: linux/drivers/usb/usb-ohci.c
Previous file: linux/drivers/usb/storage/scsiglue.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Wed Aug 15 01:22:16 2001
- Orig file:
v2.4.8/linux/drivers/usb/uhci.c
- Orig date:
Wed Jul 25 17:10:24 2001
diff -u --recursive --new-file v2.4.8/linux/drivers/usb/uhci.c linux/drivers/usb/uhci.c
@@ -98,8 +98,6 @@
static void suspend_hc(struct uhci *uhci);
static void wakeup_hc(struct uhci *uhci);
-#define min(a,b) (((a)<(b))?(a):(b))
-
/* If a transfer is still active after this much time, turn off FSBR */
#define IDLE_TIMEOUT (HZ / 20) /* 50 ms */
@@ -2133,11 +2131,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 */
@@ -2145,14 +2147,15 @@
uhci->io_addr, "UHCI-alt",
data, wLength);
if (len > 0) {
- OK (min (leni, len));
+ OK(min(int, leni, len));
} else
stat = -EPIPE;
}
break;
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);
case RH_GET_CONFIGURATION:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)