ChangeSet 1.850.1.7, 2002/10/30 00:03:43-08:00, greg@kroah.com USB: sound/usb fixups due to USB structure changes. diff -Nru a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c --- a/sound/usb/usbaudio.c Wed Oct 30 09:43:46 2002 +++ b/sound/usb/usbaudio.c Wed Oct 30 09:43:46 2002 @@ -1937,11 +1937,11 @@ .type = QUIRK_MIDI_FIXED_ENDPOINT, .data = &ep_quirk }; - struct usb_config_descriptor *cfg = chip->dev->actconfig; + struct usb_host_config *cfg = chip->dev->actconfig; struct usb_interface *iface; int err; - if (cfg->bNumInterfaces != 3) { + if (cfg->desc.bNumInterfaces != 3) { snd_printdd(KERN_ERR "invalid UA-100 descriptor\n"); return -ENXIO; } @@ -2134,18 +2134,18 @@ struct usb_interface *intf, const struct usb_device_id *usb_id) { - struct usb_config_descriptor *config = dev->actconfig; + struct usb_host_config *config = dev->actconfig; const snd_usb_audio_quirk_t *quirk = (const snd_usb_audio_quirk_t *)usb_id->driver_info; int i; snd_card_t *card; snd_usb_audio_t *chip; - int ifnum = intf->altsetting->bInterfaceNumber; + int ifnum = intf->altsetting->desc.bInterfaceNumber; if (quirk && quirk->ifnum != QUIRK_ANY_INTERFACE && ifnum != quirk->ifnum) goto __err_val; - if (usb_set_configuration(dev, config->bConfigurationValue) < 0) { - snd_printk(KERN_ERR "cannot set configuration (value 0x%x)\n", config->bConfigurationValue); + if (usb_set_configuration(dev, config->desc.bConfigurationValue) < 0) { + snd_printk(KERN_ERR "cannot set configuration (value 0x%x)\n", config->desc.bConfigurationValue); goto __err_val; } diff -Nru a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c --- a/sound/usb/usbmidi.c Wed Oct 30 09:43:46 2002 +++ b/sound/usb/usbmidi.c Wed Oct 30 09:43:46 2002 @@ -517,7 +517,7 @@ static struct usb_endpoint_descriptor* snd_usbmidi_get_int_epd(snd_usb_midi_t* umidi) { struct usb_interface* intf; - struct usb_interface_descriptor* intfd; + struct usb_host_interface* intfd; if (umidi->chip->dev->descriptor.idVendor != 0x0582) return NULL; @@ -545,7 +545,7 @@ static struct usb_endpoint_descriptor* snd_usbmidi_get_midiman_int_epd(snd_usb_midi_t* umidi) { struct usb_interface* intf = umidi->iface; - if (!intf || intf->altsetting[0].bNumEndpoints < 1) + if (!intf || intf->altsetting[0].desc.bNumEndpoints < 1) return NULL; return &intf->altsetting[0].endpoint[0].desc; } @@ -774,9 +774,9 @@ snd_usb_midi_endpoint_info_t* endpoints) { struct usb_interface* intf; - struct usb_interface_descriptor* intfd; + struct usb_host_interface* intfd; struct usb_ms_header_descriptor* ms_header; - struct usb_endpoint_descriptor* ep; + struct usb_host_endpoint* ep; struct usb_ms_endpoint_descriptor* ms_ep; int i, epidx; @@ -795,9 +795,9 @@ printk(KERN_WARNING "snd-usb-midi: MIDIStreaming interface descriptor not found\n"); epidx = 0; - for (i = 0; i < intfd->bNumEndpoints; ++i) { + for (i = 0; i < intfd->desc.bNumEndpoints; ++i) { ep = &intfd->endpoint[i]; - if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK) + if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK) continue; ms_ep = (struct usb_ms_endpoint_descriptor*)ep->extra; if (ep->extralen < 4 || @@ -806,22 +806,22 @@ ms_ep->bDescriptorSubtype != MS_GENERAL) continue; if (endpoints[epidx].epnum != 0 && - endpoints[epidx].epnum != (ep->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK)) { + endpoints[epidx].epnum != (ep->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK)) { ++epidx; if (epidx >= MIDI_MAX_ENDPOINTS) { printk(KERN_WARNING "snd-usb-midi: too many endpoints\n"); break; } } - endpoints[epidx].epnum = ep->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; - if (ep->bEndpointAddress & USB_DIR_IN) { + endpoints[epidx].epnum = ep->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; + if (ep->desc.bEndpointAddress & USB_DIR_IN) { endpoints[epidx].in_cables = (1 << ms_ep->bNumEmbMIDIJack) - 1; } else { endpoints[epidx].out_cables = (1 << ms_ep->bNumEmbMIDIJack) - 1; } printk(KERN_INFO "snd-usb-midi: detected %d %s jack(s) on endpoint %d\n", ms_ep->bNumEmbMIDIJack, - ep->bEndpointAddress & USB_DIR_IN ? "input" : "output", + ep->desc.bEndpointAddress & USB_DIR_IN ? "input" : "output", endpoints[epidx].epnum); } return 0; @@ -835,7 +835,7 @@ snd_usb_midi_endpoint_info_t* endpoint) { struct usb_interface* intf; - struct usb_interface_descriptor* intfd; + struct usb_host_interface* intfd; struct usb_endpoint_descriptor* epd; if (endpoint->epnum == -1) { @@ -858,14 +858,14 @@ snd_usb_midi_endpoint_info_t* endpoint) { struct usb_interface* intf; - struct usb_interface_descriptor* intfd; + struct usb_host_interface* intfd; uint8_t* cs_desc; intf = umidi->iface; if (!intf) return -ENOENT; intfd = intf->altsetting; - if (intfd->bNumEndpoints < 1) + if (intfd->desc.bNumEndpoints < 1) return -ENOENT; for (cs_desc = intfd->extra; @@ -892,7 +892,7 @@ { snd_usb_midi_endpoint_info_t ep_info; struct usb_interface* intf; - struct usb_interface_descriptor* intfd; + struct usb_host_interface* intfd; struct usb_endpoint_descriptor* epd; int cable, err;