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

[PATCH] USB: Altsetting updates for usb/serial

The updates needed for proper altsetting handling among the USB serial
drivers turned out to be a lot easier than I expected, thanks to the
organization of the drivers.  Only a handful of changes were needed.
parent a105e521
......@@ -995,7 +995,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
if (status)
return status;
interface = &serial->serial->dev->config->interface[0]->altsetting->desc;
interface = &serial->serial->interface->cur_altsetting->desc;
if (!interface) {
dev_err (&serial->serial->dev->dev, "%s - no interface set, error!", __FUNCTION__);
return -ENODEV;
......
......@@ -183,7 +183,7 @@ static int kobil_startup (struct usb_serial *serial)
pdev = serial->dev;
actconfig = pdev->actconfig;
interface = actconfig->interface[0];
altsetting = interface->altsetting;
altsetting = interface->cur_altsetting;
endpoint = altsetting->endpoint;
for (i = 0; i < altsetting->desc.bNumEndpoints; i++) {
......
......@@ -395,7 +395,7 @@ static int safe_write_room (struct usb_serial_port *port)
static int safe_startup (struct usb_serial *serial)
{
switch (serial->interface->altsetting->desc.bInterfaceProtocol) {
switch (serial->interface->cur_altsetting->desc.bInterfaceProtocol) {
case LINEO_SAFESERIAL_CRC:
break;
case LINEO_SAFESERIAL_CRC_PADDED:
......
......@@ -1037,7 +1037,7 @@ int usb_serial_probe(struct usb_interface *interface,
(dev->descriptor.idProduct == ATEN_PRODUCT_ID))) {
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]->cur_altsetting;
for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
endpoint = &iface_desc->endpoint[i].desc;
if ((endpoint->bEndpointAddress & 0x80) &&
......
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