ChangeSet 1.1595.7.3, 2003/07/29 11:40:22-07:00, greg@kroah.com [PATCH] USB: changes due to struct usb_interface changing from a pointer to an array of pointers. drivers/media/video/cpia_usb.c | 2 +- drivers/usb/class/audio.c | 14 +++++++------- drivers/usb/class/cdc-acm.c | 14 +++++++------- drivers/usb/class/usb-midi.c | 12 ++++++------ drivers/usb/class/usblp.c | 2 +- drivers/usb/core/usb-debug.c | 2 +- drivers/usb/image/scanner.c | 2 +- drivers/usb/media/ibmcam.c | 4 ++-- drivers/usb/media/konicawc.c | 2 +- drivers/usb/media/ov511.c | 2 +- drivers/usb/media/pwc-if.c | 2 +- drivers/usb/misc/brlvger.c | 2 +- drivers/usb/net/usbnet.c | 2 +- drivers/usb/serial/io_ti.c | 2 +- drivers/usb/serial/kobil_sct.c | 2 +- drivers/usb/serial/usb-serial.c | 4 ++-- sound/usb/usbaudio.c | 10 +++++----- sound/usb/usbmixer.c | 2 +- 18 files changed, 41 insertions(+), 41 deletions(-) diff -Nru a/drivers/media/video/cpia_usb.c b/drivers/media/video/cpia_usb.c --- a/drivers/media/video/cpia_usb.c Fri Aug 1 10:56:51 2003 +++ b/drivers/media/video/cpia_usb.c Fri Aug 1 10:56:51 2003 @@ -621,7 +621,7 @@ udev = interface_to_usbdev(intf); usb_driver_release_interface(&cpia_driver, - &udev->actconfig->interface[0]); + udev->actconfig->interface[0]); ucpia->curbuff = ucpia->workbuff = NULL; diff -Nru a/drivers/usb/class/audio.c b/drivers/usb/class/audio.c --- a/drivers/usb/class/audio.c Fri Aug 1 10:56:51 2003 +++ b/drivers/usb/class/audio.c Fri Aug 1 10:56:51 2003 @@ -1524,7 +1524,7 @@ if (u->interface < 0 || u->interface >= config->desc.bNumInterfaces) return 0; - iface = &config->interface[u->interface]; + iface = config->interface[u->interface]; fmtnr = find_format(as->fmtin, as->numfmtin, d->format, d->srate); if (fmtnr < 0) { @@ -1612,7 +1612,7 @@ if (u->interface < 0 || u->interface >= config->desc.bNumInterfaces) return 0; - iface = &config->interface[u->interface]; + iface = config->interface[u->interface]; fmtnr = find_format(as->fmtout, as->numfmtout, d->format, d->srate); if (fmtnr < 0) { @@ -2704,7 +2704,7 @@ if (file->f_mode & FMODE_WRITE) { usbout_stop(as); if (dev && as->usbout.interface >= 0) { - iface = &dev->actconfig->interface[as->usbout.interface]; + iface = dev->actconfig->interface[as->usbout.interface]; usb_set_interface(dev, iface->altsetting->desc.bInterfaceNumber, 0); } dmabuf_release(&as->usbout.dma); @@ -2713,7 +2713,7 @@ if (file->f_mode & FMODE_READ) { usbin_stop(as); if (dev && as->usbin.interface >= 0) { - iface = &dev->actconfig->interface[as->usbin.interface]; + iface = dev->actconfig->interface[as->usbin.interface]; usb_set_interface(dev, iface->altsetting->desc.bInterfaceNumber, 0); } dmabuf_release(&as->usbin.dma); @@ -2866,7 +2866,7 @@ /* search for input formats */ if (asifin >= 0) { as->usbin.flags = FLG_CONNECTED; - iface = &config->interface[asifin]; + iface = config->interface[asifin]; for (i = 0; i < iface->num_altsetting; i++) { alts = &iface->altsetting[i]; if (alts->desc.bInterfaceClass != USB_CLASS_AUDIO || alts->desc.bInterfaceSubClass != 2) @@ -2947,7 +2947,7 @@ /* search for output formats */ if (asifout >= 0) { as->usbout.flags = FLG_CONNECTED; - iface = &config->interface[asifout]; + iface = config->interface[asifout]; for (i = 0; i < iface->num_altsetting; i++) { alts = &iface->altsetting[i]; if (alts->desc.bInterfaceClass != USB_CLASS_AUDIO || alts->desc.bInterfaceSubClass != 2) @@ -3684,7 +3684,7 @@ dev->devnum, ctrlif, j); continue; } - iface = &config->interface[j]; + iface = config->interface[j]; if (iface->altsetting[0].desc.bInterfaceClass != USB_CLASS_AUDIO) { printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u interface %u is not an AudioClass interface\n", dev->devnum, ctrlif, j); diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c --- a/drivers/usb/class/cdc-acm.c Fri Aug 1 10:56:51 2003 +++ b/drivers/usb/class/cdc-acm.c Fri Aug 1 10:56:51 2003 @@ -560,16 +560,16 @@ for (j = 0; j < cfacm->desc.bNumInterfaces - 1; j++) { - if (usb_interface_claimed(cfacm->interface + j) || - usb_interface_claimed(cfacm->interface + j + 1)) + if (usb_interface_claimed(cfacm->interface[j]) || + usb_interface_claimed(cfacm->interface[j + 1])) continue; - ifcom = cfacm->interface[j].altsetting + 0; - ifdata = cfacm->interface[j + 1].altsetting + 0; + ifcom = cfacm->interface[j]->altsetting + 0; + ifdata = cfacm->interface[j + 1]->altsetting + 0; if (ifdata->desc.bInterfaceClass != 10 || ifdata->desc.bNumEndpoints < 2) { - ifcom = cfacm->interface[j + 1].altsetting + 0; - ifdata = cfacm->interface[j].altsetting + 0; + ifcom = cfacm->interface[j + 1]->altsetting + 0; + ifdata = cfacm->interface[j]->altsetting + 0; if (ifdata->desc.bInterfaceClass != 10 || ifdata->desc.bNumEndpoints < 2) continue; } @@ -610,7 +610,7 @@ ctrlsize = epctrl->wMaxPacketSize; readsize = epread->wMaxPacketSize; acm->writesize = epwrite->wMaxPacketSize; - acm->iface = cfacm->interface + j; + acm->iface = cfacm->interface[j]; acm->minor = minor; acm->dev = dev; diff -Nru a/drivers/usb/class/usb-midi.c b/drivers/usb/class/usb-midi.c --- a/drivers/usb/class/usb-midi.c Fri Aug 1 10:56:51 2003 +++ b/drivers/usb/class/usb-midi.c Fri Aug 1 10:56:51 2003 @@ -1524,10 +1524,10 @@ int epin, epout; int i; - alts = d->actconfig->interface[ifnum].num_altsetting; + alts = d->actconfig->interface[ifnum]->num_altsetting; for ( alt=0 ; altactconfig->interface[ifnum].altsetting[alt]; + interface = &d->actconfig->interface[ifnum]->altsetting[alt]; epin = -1; epout = -1; @@ -1795,8 +1795,8 @@ return -EINVAL; } - for ( i=0 ; i < c->interface[ifnum].num_altsetting; i++ ) { - interface = c->interface[ifnum].altsetting + i; + for ( i=0 ; i < c->interface[ifnum]->num_altsetting; i++ ) { + interface = c->interface[ifnum]->altsetting + i; if ( interface->desc.bInterfaceClass != 255 || interface->desc.bInterfaceSubClass != 0 ) @@ -1889,8 +1889,8 @@ int alts=-1; int ret; - for ( i=0 ; i < c->interface[ifnum].num_altsetting; i++ ) { - interface = c->interface[ifnum].altsetting + i; + for ( i=0 ; i < c->interface[ifnum]->num_altsetting; i++ ) { + interface = c->interface[ifnum]->altsetting + i; if ( interface->desc.bInterfaceClass != USB_CLASS_AUDIO || interface->desc.bInterfaceSubClass != USB_SUBCLASS_MIDISTREAMING ) diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c --- a/drivers/usb/class/usblp.c Fri Aug 1 10:56:51 2003 +++ b/drivers/usb/class/usblp.c Fri Aug 1 10:56:51 2003 @@ -966,7 +966,7 @@ struct usb_endpoint_descriptor *epd, *epwrite, *epread; int p, i, e; - if_alt = &usblp->dev->actconfig->interface[usblp->ifnum]; + if_alt = usblp->dev->actconfig->interface[usblp->ifnum]; for (p = 0; p < USBLP_MAX_PROTOCOLS; p++) usblp->protocol[p].alt_setting = -1; diff -Nru a/drivers/usb/core/usb-debug.c b/drivers/usb/core/usb-debug.c --- a/drivers/usb/core/usb-debug.c Fri Aug 1 10:56:51 2003 +++ b/drivers/usb/core/usb-debug.c Fri Aug 1 10:56:51 2003 @@ -37,7 +37,7 @@ usb_show_config_descriptor(&config->desc); for (i = 0; i < config->desc.bNumInterfaces; i++) { - ifp = config->interface + i; + ifp = config->interface[i]; if (!ifp) break; diff -Nru a/drivers/usb/image/scanner.c b/drivers/usb/image/scanner.c --- a/drivers/usb/image/scanner.c Fri Aug 1 10:56:51 2003 +++ b/drivers/usb/image/scanner.c Fri Aug 1 10:56:51 2003 @@ -847,7 +847,7 @@ down (&(scn->sem)); usb_driver_release_interface(&scanner_driver, - &scn->scn_dev->actconfig->interface[scn->ifnum]); + scn->scn_dev->actconfig->interface[scn->ifnum]); kfree(scn->ibuf); kfree(scn->obuf); diff -Nru a/drivers/usb/media/ibmcam.c b/drivers/usb/media/ibmcam.c --- a/drivers/usb/media/ibmcam.c Fri Aug 1 10:56:51 2003 +++ b/drivers/usb/media/ibmcam.c Fri Aug 1 10:56:51 2003 @@ -3718,7 +3718,7 @@ } while (0); /* Validate found interface: must have one ISO endpoint */ - nas = dev->actconfig->interface[ifnum].num_altsetting; + nas = dev->actconfig->interface[ifnum]->num_altsetting; if (debug > 0) info("Number of alternate settings=%d.", nas); if (nas < 2) { @@ -3730,7 +3730,7 @@ const struct usb_host_interface *interface; const struct usb_endpoint_descriptor *endpoint; - interface = &dev->actconfig->interface[ifnum].altsetting[i]; + interface = &dev->actconfig->interface[ifnum]->altsetting[i]; if (interface->desc.bNumEndpoints != 1) { err("Interface %d. has %u. endpoints!", ifnum, (unsigned)(interface->desc.bNumEndpoints)); diff -Nru a/drivers/usb/media/konicawc.c b/drivers/usb/media/konicawc.c --- a/drivers/usb/media/konicawc.c Fri Aug 1 10:56:51 2003 +++ b/drivers/usb/media/konicawc.c Fri Aug 1 10:56:51 2003 @@ -383,7 +383,7 @@ int pktsz; struct usb_host_interface *interface; - interface = &dev->actconfig->interface[uvd->iface].altsetting[spd_to_iface[cam->speed]]; + interface = &dev->actconfig->interface[uvd->iface]->altsetting[spd_to_iface[cam->speed]]; pktsz = interface->endpoint[1].desc.wMaxPacketSize; DEBUG(1, "pktsz = %d", pktsz); if (!CAMERA_IS_OPERATIONAL(uvd)) { diff -Nru a/drivers/usb/media/ov511.c b/drivers/usb/media/ov511.c --- a/drivers/usb/media/ov511.c Fri Aug 1 10:56:51 2003 +++ b/drivers/usb/media/ov511.c Fri Aug 1 10:56:51 2003 @@ -6088,7 +6088,7 @@ if (ov->bridge == BRG_OV518) { - struct usb_interface *ifp = &ov->dev->config[0].interface[0]; + struct usb_interface *ifp = ov->dev->config[0].interface[0]; __u16 mxps = ifp->altsetting[7].endpoint[0].desc.wMaxPacketSize; /* Some OV518s have packet numbering by default, some don't */ diff -Nru a/drivers/usb/media/pwc-if.c b/drivers/usb/media/pwc-if.c --- a/drivers/usb/media/pwc-if.c Fri Aug 1 10:56:51 2003 +++ b/drivers/usb/media/pwc-if.c Fri Aug 1 10:56:51 2003 @@ -796,7 +796,7 @@ /* Get the current alternate interface, adjust packet size */ if (!udev->actconfig) return -EFAULT; - idesc = &udev->actconfig->interface[0].altsetting[pdev->valternate]; + idesc = &udev->actconfig->interface[0]->altsetting[pdev->valternate]; if (!idesc) return -EFAULT; diff -Nru a/drivers/usb/misc/brlvger.c b/drivers/usb/misc/brlvger.c --- a/drivers/usb/misc/brlvger.c Fri Aug 1 10:56:51 2003 +++ b/drivers/usb/misc/brlvger.c Fri Aug 1 10:56:51 2003 @@ -289,7 +289,7 @@ we reserve it.*/ static DECLARE_MUTEX(reserve_sem); - actifsettings = dev->actconfig->interface->altsetting; + actifsettings = dev->actconfig->interface[0]->altsetting; if( dev->descriptor.bNumConfigurations != 1 || dev->config->desc.bNumInterfaces != 1 diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c --- a/drivers/usb/net/usbnet.c Fri Aug 1 10:56:51 2003 +++ b/drivers/usb/net/usbnet.c Fri Aug 1 10:56:51 2003 @@ -547,7 +547,7 @@ d = &intf->altsetting->desc; if (info->u->bMasterInterface0 != d->bInterfaceNumber) goto bad_desc; - info->data = dev->udev->actconfig->interface; + info->data = dev->udev->actconfig->interface[0]; if (intf != (info->data + info->u->bMasterInterface0)) goto bad_desc; diff -Nru a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c --- a/drivers/usb/serial/io_ti.c Fri Aug 1 10:56:51 2003 +++ b/drivers/usb/serial/io_ti.c Fri Aug 1 10:56:51 2003 @@ -993,7 +993,7 @@ if (status) return status; - interface = &serial->serial->dev->config->interface->altsetting->desc; + interface = &serial->serial->dev->config->interface[0]->altsetting->desc; if (!interface) { dev_err (&serial->serial->dev->dev, "%s - no interface set, error!", __FUNCTION__); return -ENODEV; diff -Nru a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c --- a/drivers/usb/serial/kobil_sct.c Fri Aug 1 10:56:51 2003 +++ b/drivers/usb/serial/kobil_sct.c Fri Aug 1 10:56:51 2003 @@ -182,7 +182,7 @@ // search for the necessary endpoints pdev = serial->dev; actconfig = pdev->actconfig; - interface = actconfig->interface; + interface = actconfig->interface[0]; altsetting = interface->altsetting; endpoint = altsetting->endpoint; diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c --- a/drivers/usb/serial/usb-serial.c Fri Aug 1 10:56:51 2003 +++ b/drivers/usb/serial/usb-serial.c Fri Aug 1 10:56:51 2003 @@ -1055,9 +1055,9 @@ (dev->descriptor.idProduct == PL2303_PRODUCT_ID)) || ((dev->descriptor.idVendor == ATEN_VENDOR_ID) && (dev->descriptor.idProduct == ATEN_PRODUCT_ID))) { - if (interface != &dev->actconfig->interface[0]) { + if (interface != dev->actconfig->interface[0]) { /* check out the endpoints of the other interface*/ - iface_desc = &dev->actconfig->interface[0].altsetting[0]; + iface_desc = &dev->actconfig->interface[0]->altsetting[0]; for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { endpoint = &iface_desc->endpoint[i].desc; if ((endpoint->bEndpointAddress & 0x80) && diff -Nru a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c --- a/sound/usb/usbaudio.c Fri Aug 1 10:56:51 2003 +++ b/sound/usb/usbaudio.c Fri Aug 1 10:56:51 2003 @@ -1061,7 +1061,7 @@ return -EINVAL; } - iface = &config->interface[fmt->iface]; + iface = config->interface[fmt->iface]; alts = &iface->altsetting[fmt->altset_idx]; altsd = get_iface_desc(alts); snd_assert(altsd->bAlternateSetting == fmt->altsetting, return -EINVAL); @@ -2156,7 +2156,7 @@ config = dev->actconfig; /* parse the interface's altsettings */ - iface = &config->interface[iface_no]; + iface = config->interface[iface_no]; for (i = 0; i < iface->num_altsetting; i++) { alts = &iface->altsetting[i]; altsd = get_iface_desc(alts); @@ -2291,7 +2291,7 @@ /* find audiocontrol interface */ config = dev->actconfig; - host_iface = &config->interface[ctrlif].altsetting[0]; + host_iface = &config->interface[ctrlif]->altsetting[0]; if (!(p1 = snd_usb_find_csint_desc(host_iface->extra, host_iface->extralen, NULL, HEADER))) { snd_printk(KERN_ERR "cannot find HEADER\n"); return -EINVAL; @@ -2313,7 +2313,7 @@ dev->devnum, ctrlif, j); continue; } - iface = &config->interface[j]; + iface = config->interface[j]; if (usb_interface_claimed(iface)) { snd_printdd(KERN_INFO "%d:%d:%d: skipping, already claimed\n", dev->devnum, ctrlif, j); continue; @@ -2429,7 +2429,7 @@ for (quirk = quirk->data; quirk->ifnum >= 0; ++quirk) { if (quirk->ifnum >= get_cfg_desc(config)->bNumInterfaces) continue; - iface = &config->interface[quirk->ifnum]; + iface = config->interface[quirk->ifnum]; if (quirk->ifnum != probed_ifnum && usb_interface_claimed(iface)) continue; diff -Nru a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c --- a/sound/usb/usbmixer.c Fri Aug 1 10:56:51 2003 +++ b/sound/usb/usbmixer.c Fri Aug 1 10:56:51 2003 @@ -1490,7 +1490,7 @@ int err; const struct usbmix_ctl_map *map; struct usb_device_descriptor *dev = &chip->dev->descriptor; - struct usb_host_interface *hostif = &chip->dev->actconfig->interface[ctrlif].altsetting[0]; + struct usb_host_interface *hostif = &chip->dev->actconfig->interface[ctrlif]->altsetting[0]; strcpy(chip->card->mixername, "USB Mixer");