Commit 8a88fa5d authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: drivers/isdn/hisax fixups due to USB structure changes.

parent c632fbc3
......@@ -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);
......
......@@ -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);
......
......@@ -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;
}
......
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