ChangeSet 1.850.1.8, 2002/10/30 00:04:37-08:00, greg@kroah.com

USB: drivers/usb fixups due to USB structure changes.


diff -Nru a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
--- a/drivers/bluetooth/hci_usb.c	Wed Oct 30 09:43:41 2002
+++ b/drivers/bluetooth/hci_usb.c	Wed Oct 30 09:43:41 2002
@@ -629,13 +629,13 @@
 int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
 {
 	struct usb_device *udev = interface_to_usbdev(intf);	
-	struct usb_endpoint_descriptor *bulk_out_ep[HCI_MAX_IFACE_NUM];
-	struct usb_endpoint_descriptor *isoc_out_ep[HCI_MAX_IFACE_NUM];
-	struct usb_endpoint_descriptor *bulk_in_ep[HCI_MAX_IFACE_NUM];
-	struct usb_endpoint_descriptor *isoc_in_ep[HCI_MAX_IFACE_NUM];
-	struct usb_endpoint_descriptor *intr_in_ep[HCI_MAX_IFACE_NUM];
-	struct usb_interface_descriptor *uif;
-	struct usb_endpoint_descriptor *ep;
+	struct usb_host_endpoint *bulk_out_ep[HCI_MAX_IFACE_NUM];
+	struct usb_host_endpoint *isoc_out_ep[HCI_MAX_IFACE_NUM];
+	struct usb_host_endpoint *bulk_in_ep[HCI_MAX_IFACE_NUM];
+	struct usb_host_endpoint *isoc_in_ep[HCI_MAX_IFACE_NUM];
+	struct usb_host_endpoint *intr_in_ep[HCI_MAX_IFACE_NUM];
+	struct usb_host_interface *uif;
+	struct usb_host_endpoint *ep;
 	struct usb_interface *iface, *isoc_iface;
 	struct hci_usb *husb;
 	struct hci_dev *hdev;
@@ -648,7 +648,7 @@
 		return -EIO;
 
 	/* Check number of endpoints */
-	if (intf->altsetting[0].bNumEndpoints < 3)
+	if (intf->altsetting[0].desc.bNumEndpoints < 3)
 		return -EIO;
 
 	memset(bulk_out_ep, 0, sizeof(bulk_out_ep));
@@ -663,37 +663,37 @@
 	
 	/* Find endpoints that we need */
 
-	ifn = min_t(unsigned int, udev->actconfig->bNumInterfaces, HCI_MAX_IFACE_NUM);
+	ifn = min_t(unsigned int, udev->actconfig->desc.bNumInterfaces, HCI_MAX_IFACE_NUM);
 	for (i = 0; i < ifn; i++) {
 		iface = &udev->actconfig->interface[i];
 		for (a = 0; a < iface->num_altsetting; a++) {
 			uif = &iface->altsetting[a];
-			for (e = 0; e < uif->bNumEndpoints; e++) {
+			for (e = 0; e < uif->desc.bNumEndpoints; e++) {
 				ep = &uif->endpoint[e];
 
-				switch (ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
+				switch (ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
 				case USB_ENDPOINT_XFER_INT:
-					if (ep->bEndpointAddress & USB_DIR_IN)
+					if (ep->desc.bEndpointAddress & USB_DIR_IN)
 						intr_in_ep[i] = ep;
 					break;
 
 				case USB_ENDPOINT_XFER_BULK:
-					if (ep->bEndpointAddress & USB_DIR_IN)
+					if (ep->desc.bEndpointAddress & USB_DIR_IN)
 						bulk_in_ep[i]  = ep;
 					else
 						bulk_out_ep[i] = ep;
 					break;
 
 				case USB_ENDPOINT_XFER_ISOC:
-					if (ep->wMaxPacketSize < size)
+					if (ep->desc.wMaxPacketSize < size)
 						break;
-					size = ep->wMaxPacketSize;
+					size = ep->desc.wMaxPacketSize;
 
 					isoc_iface = iface;
 					isoc_alts  = a;
 					isoc_ifnum = i;
 
-					if (ep->bEndpointAddress & USB_DIR_IN)
+					if (ep->desc.bEndpointAddress & USB_DIR_IN)
 						isoc_in_ep[i]  = ep;
 					else
 						isoc_out_ep[i] = ep;
@@ -721,11 +721,11 @@
 	memset(husb, 0, sizeof(struct hci_usb));
 
 	husb->udev = udev;
-	husb->bulk_out_ep = bulk_out_ep[0]->bEndpointAddress;
-	husb->bulk_in_ep  = bulk_in_ep[0]->bEndpointAddress;
+	husb->bulk_out_ep = bulk_out_ep[0]->desc.bEndpointAddress;
+	husb->bulk_in_ep  = bulk_in_ep[0]->desc.bEndpointAddress;
 
-	husb->intr_ep = intr_in_ep[0]->bEndpointAddress;
-	husb->intr_interval = intr_in_ep[0]->bInterval;
+	husb->intr_ep = intr_in_ep[0]->desc.bEndpointAddress;
+	husb->intr_interval = intr_in_ep[0]->desc.bInterval;
 
 	if (isoc_iface) {
 		if (usb_set_interface(udev, isoc_ifnum, isoc_alts)) {
@@ -735,8 +735,8 @@
 		usb_driver_claim_interface(&hci_usb_driver, isoc_iface, husb);
 		husb->isoc_iface  = isoc_iface;
 
-		husb->isoc_in_ep  = isoc_in_ep[1]->bEndpointAddress;
-		husb->isoc_out_ep = isoc_in_ep[1]->bEndpointAddress;
+		husb->isoc_in_ep  = isoc_in_ep[1]->desc.bEndpointAddress;
+		husb->isoc_out_ep = isoc_in_ep[1]->desc.bEndpointAddress;
 	}
 
 	husb->completion_lock = RW_LOCK_UNLOCKED;