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) ...@@ -995,7 +995,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
if (status) if (status)
return status; return status;
interface = &serial->serial->dev->config->interface[0]->altsetting->desc; interface = &serial->serial->interface->cur_altsetting->desc;
if (!interface) { if (!interface) {
dev_err (&serial->serial->dev->dev, "%s - no interface set, error!", __FUNCTION__); dev_err (&serial->serial->dev->dev, "%s - no interface set, error!", __FUNCTION__);
return -ENODEV; return -ENODEV;
......
...@@ -183,7 +183,7 @@ static int kobil_startup (struct usb_serial *serial) ...@@ -183,7 +183,7 @@ static int kobil_startup (struct usb_serial *serial)
pdev = serial->dev; pdev = serial->dev;
actconfig = pdev->actconfig; actconfig = pdev->actconfig;
interface = actconfig->interface[0]; interface = actconfig->interface[0];
altsetting = interface->altsetting; altsetting = interface->cur_altsetting;
endpoint = altsetting->endpoint; endpoint = altsetting->endpoint;
for (i = 0; i < altsetting->desc.bNumEndpoints; i++) { for (i = 0; i < altsetting->desc.bNumEndpoints; i++) {
......
...@@ -395,7 +395,7 @@ static int safe_write_room (struct usb_serial_port *port) ...@@ -395,7 +395,7 @@ static int safe_write_room (struct usb_serial_port *port)
static int safe_startup (struct usb_serial *serial) 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: case LINEO_SAFESERIAL_CRC:
break; break;
case LINEO_SAFESERIAL_CRC_PADDED: case LINEO_SAFESERIAL_CRC_PADDED:
......
...@@ -1037,7 +1037,7 @@ int usb_serial_probe(struct usb_interface *interface, ...@@ -1037,7 +1037,7 @@ int usb_serial_probe(struct usb_interface *interface,
(dev->descriptor.idProduct == ATEN_PRODUCT_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*/ /* 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) { for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
endpoint = &iface_desc->endpoint[i].desc; endpoint = &iface_desc->endpoint[i].desc;
if ((endpoint->bEndpointAddress & 0x80) && 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