Commit 581dc32c authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[PATCH] USB: Altsetting update for USB net drivers

The only driver under usb/net that needed any altsetting changes was
usbnet.  I'm not looking forward to going through all the source files
under usb/serial. :-(
parent cb2e2a36
...@@ -928,8 +928,8 @@ static struct usb_driver usbnet_driver; ...@@ -928,8 +928,8 @@ static struct usb_driver usbnet_driver;
*/ */
static int generic_cdc_bind (struct usbnet *dev, struct usb_interface *intf) static int generic_cdc_bind (struct usbnet *dev, struct usb_interface *intf)
{ {
u8 *buf = intf->altsetting->extra; u8 *buf = intf->cur_altsetting->extra;
int len = intf->altsetting->extralen; int len = intf->cur_altsetting->extralen;
struct usb_interface_descriptor *d; struct usb_interface_descriptor *d;
struct cdc_state *info = (void *) &dev->data; struct cdc_state *info = (void *) &dev->data;
int status; int status;
...@@ -955,7 +955,7 @@ static int generic_cdc_bind (struct usbnet *dev, struct usb_interface *intf) ...@@ -955,7 +955,7 @@ static int generic_cdc_bind (struct usbnet *dev, struct usb_interface *intf)
/* this assumes that if there's a non-RNDIS vendor variant /* this assumes that if there's a non-RNDIS vendor variant
* of cdc-acm, it'll fail RNDIS requests cleanly. * of cdc-acm, it'll fail RNDIS requests cleanly.
*/ */
rndis = (intf->altsetting->desc.bInterfaceProtocol == 0xff); rndis = (intf->cur_altsetting->desc.bInterfaceProtocol == 0xff);
memset (info, 0, sizeof *info); memset (info, 0, sizeof *info);
info->control = intf; info->control = intf;
...@@ -1025,7 +1025,7 @@ static int generic_cdc_bind (struct usbnet *dev, struct usb_interface *intf) ...@@ -1025,7 +1025,7 @@ static int generic_cdc_bind (struct usbnet *dev, struct usb_interface *intf)
} }
/* a data interface altsetting does the real i/o */ /* a data interface altsetting does the real i/o */
d = &info->data->altsetting->desc; d = &info->data->cur_altsetting->desc;
if (d->bInterfaceClass != USB_CLASS_CDC_DATA) { if (d->bInterfaceClass != USB_CLASS_CDC_DATA) {
dev_dbg (&intf->dev, "slave class %u\n", dev_dbg (&intf->dev, "slave class %u\n",
d->bInterfaceClass); d->bInterfaceClass);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment