ChangeSet 1.1371.759.28, 2004/04/26 16:09:34-07:00, [EMAIL PROTECTED]
[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.
drivers/usb/serial/io_ti.c | 2 +-
drivers/usb/serial/kobil_sct.c | 2 +-
drivers/usb/serial/safe_serial.c | 2 +-
drivers/usb/serial/usb-serial.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff -Nru a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
--- a/drivers/usb/serial/io_ti.c Fri May 14 15:32:37 2004
+++ b/drivers/usb/serial/io_ti.c Fri May 14 15:32:37 2004
@@ -995,7 +995,7 @@
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;
diff -Nru a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
--- a/drivers/usb/serial/kobil_sct.c Fri May 14 15:32:37 2004
+++ b/drivers/usb/serial/kobil_sct.c Fri May 14 15:32:37 2004
@@ -183,7 +183,7 @@
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++) {
diff -Nru a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
--- a/drivers/usb/serial/safe_serial.c Fri May 14 15:32:37 2004
+++ b/drivers/usb/serial/safe_serial.c Fri May 14 15:32:37 2004
@@ -395,7 +395,7 @@
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:
diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c Fri May 14 15:32:37 2004
+++ b/drivers/usb/serial/usb-serial.c Fri May 14 15:32:37 2004
@@ -1037,7 +1037,7 @@
(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) &&
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel