]> git.neil.brown.name Git - history.git/commitdiff
USB: drivers/isdn/hisax fixups due to USB structure changes.
authorGreg Kroah-Hartman <greg@kroah.com>
Tue, 29 Oct 2002 16:05:31 +0000 (08:05 -0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 29 Oct 2002 16:05:31 +0000 (08:05 -0800)
drivers/isdn/hisax/st5481_b.c
drivers/isdn/hisax/st5481_d.c
drivers/isdn/hisax/st5481_usb.c

index 22576dfd14f00f4f75adc696224faad438fd4cef..9cfe28e942937093658232702ea33cd39ef361c3 100644 (file)
@@ -253,8 +253,8 @@ static void st5481B_mode(struct st5481_bcs *bcs, int mode)
 static int __devinit st5481_setup_b_out(struct st5481_bcs *bcs)
 {
        struct usb_device *dev = bcs->adapter->usb_dev;
-       struct usb_interface_descriptor *altsetting;
-       struct usb_endpoint_descriptor *endpoint;
+       struct usb_host_interface *altsetting;
+       struct usb_host_endpoint *endpoint;
        struct st5481_b_out *b_out = &bcs->b_out;
 
        DBG(4,"");
@@ -265,11 +265,11 @@ static int __devinit st5481_setup_b_out(struct st5481_bcs *bcs)
        endpoint = &altsetting->endpoint[EP_B1_OUT - 1 + bcs->channel * 2];
 
        DBG(4,"endpoint address=%02x,packet size=%d",
-           endpoint->bEndpointAddress,endpoint->wMaxPacketSize);
+           endpoint->desc.bEndpointAddress,endpoint->desc.wMaxPacketSize);
 
        // Allocate memory for 8000bytes/sec + extra bytes if underrun
        return st5481_setup_isocpipes(b_out->urb, dev, 
-                                     usb_sndisocpipe(dev, endpoint->bEndpointAddress),
+                                     usb_sndisocpipe(dev, endpoint->desc.bEndpointAddress),
                                      NUM_ISO_PACKETS_B, SIZE_ISO_PACKETS_B_OUT,
                                      NUM_ISO_PACKETS_B * SIZE_ISO_PACKETS_B_OUT + B_FLOW_ADJUST,
                                      usb_b_out_complete, bcs);
index 01ee4f3b102c517342bea46604a09d1d44572b2b..02feec24fbb4eaf34bc45f0f3d03e4a16e25bf61 100644 (file)
@@ -652,8 +652,8 @@ static void ph_disconnect(struct st5481_adapter *adapter)
 static int __devinit st5481_setup_d_out(struct st5481_adapter *adapter)
 {
        struct usb_device *dev = adapter->usb_dev;
-       struct usb_interface_descriptor *altsetting;
-       struct usb_endpoint_descriptor *endpoint;
+       struct usb_host_interface *altsetting;
+       struct usb_host_endpoint *endpoint;
        struct st5481_d_out *d_out = &adapter->d_out;
 
        DBG(2,"");
@@ -664,10 +664,10 @@ static int __devinit st5481_setup_d_out(struct st5481_adapter *adapter)
        endpoint = &altsetting->endpoint[EP_D_OUT-1];
 
        DBG(2,"endpoint address=%02x,packet size=%d",
-           endpoint->bEndpointAddress,endpoint->wMaxPacketSize);
+           endpoint->desc.bEndpointAddress,endpoint->desc.wMaxPacketSize);
 
        return st5481_setup_isocpipes(d_out->urb, dev, 
-                                     usb_sndisocpipe(dev, endpoint->bEndpointAddress),
+                                     usb_sndisocpipe(dev, endpoint->desc.bEndpointAddress),
                                      NUM_ISO_PACKETS_D, SIZE_ISO_PACKETS_D_OUT,
                                      NUM_ISO_PACKETS_D * SIZE_ISO_PACKETS_D_OUT,
                                      usb_d_out_complete, adapter);
index 89bb2f66c60e414ec111a64ca9be12abb90ce104..d7a326f06199ee32bcb4affad5b916c7ba1a9954 100644 (file)
@@ -244,15 +244,15 @@ int __devinit st5481_setup_usb(struct st5481_adapter *adapter)
        struct usb_device *dev = adapter->usb_dev;
        struct st5481_ctrl *ctrl = &adapter->ctrl;
        struct st5481_intr *intr = &adapter->intr;
-       struct usb_interface_descriptor *altsetting;
-       struct usb_endpoint_descriptor *endpoint;
+       struct usb_host_interface *altsetting;
+       struct usb_host_endpoint *endpoint;
        int status;
        struct urb *urb;
        u_char *buf;
        
        DBG(1,"");
        
-       if ((status = usb_set_configuration (dev,dev->config[0].bConfigurationValue)) < 0) {
+       if ((status = usb_set_configuration (dev,dev->config[0].desc.bConfigurationValue)) < 0) {
                WARN("set_configuration failed,status=%d",status);
                return status;
        }
@@ -261,14 +261,14 @@ int __devinit st5481_setup_usb(struct st5481_adapter *adapter)
        altsetting = &(dev->config->interface[0].altsetting[3]);        
 
        // Check if the config is sane
-       if ( altsetting->bNumEndpoints != 7 ) {
-               WARN("expecting 7 got %d endpoints!", altsetting->bNumEndpoints);
+       if ( altsetting->desc.bNumEndpoints != 7 ) {
+               WARN("expecting 7 got %d endpoints!", altsetting->desc.bNumEndpoints);
                return -EINVAL;
        }
 
        // The descriptor is wrong for some early samples of the ST5481 chip
-       altsetting->endpoint[3].wMaxPacketSize = 32;
-       altsetting->endpoint[4].wMaxPacketSize = 32;
+       altsetting->endpoint[3].desc.wMaxPacketSize = 32;
+       altsetting->endpoint[4].desc.wMaxPacketSize = 32;
 
        // Use alternative setting 3 on interface 0 to have 2B+D
        if ((status = usb_set_interface (dev, 0, 3)) < 0) {
@@ -307,10 +307,10 @@ int __devinit st5481_setup_usb(struct st5481_adapter *adapter)
                                
        // Fill the interrupt URB
        usb_fill_int_urb(urb, dev,
-                    usb_rcvintpipe(dev, endpoint->bEndpointAddress),
+                    usb_rcvintpipe(dev, endpoint->desc.bEndpointAddress),
                     buf, INT_PKT_SIZE,
                     usb_int_complete, adapter,
-                    endpoint->bInterval);
+                    endpoint->desc.bInterval);
                
        return 0;
 }