X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fisdn%2Fhisax%2Fhfc_usb.c;h=b1a26e02df0263476c53a7de9faf9385ba94c26d;hb=96a6099d2fb448cc06401386c7703a6ca015ac3d;hp=42bbae2a646c49622af83b6e6cda2db04a188c03;hpb=a871fe858c5437ff8798fbaef52b6a88110b64a1;p=linux-2.6-omap-h63xx.git diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c index 42bbae2a646..b1a26e02df0 100644 --- a/drivers/isdn/hisax/hfc_usb.c +++ b/drivers/isdn/hisax/hfc_usb.c @@ -37,8 +37,6 @@ #include #include #include -#include -#include #include "hisax.h" #include "hisax_if.h" #include "hfc_usb.h" @@ -487,7 +485,6 @@ fill_isoc_urb(struct urb *urb, struct usb_device *dev, unsigned int pipe, { int k; - spin_lock_init(&urb->lock); urb->dev = dev; urb->pipe = pipe; urb->complete = complete; @@ -580,16 +577,14 @@ stop_isoc_chain(usb_fifo * fifo) "HFC-S USB: Stopping iso chain for fifo %i.%i", fifo->fifonum, i); #endif - usb_unlink_urb(fifo->iso[i].purb); + usb_kill_urb(fifo->iso[i].purb); usb_free_urb(fifo->iso[i].purb); fifo->iso[i].purb = NULL; } } - if (fifo->urb) { - usb_unlink_urb(fifo->urb); - usb_free_urb(fifo->urb); - fifo->urb = NULL; - } + usb_kill_urb(fifo->urb); + usb_free_urb(fifo->urb); + fifo->urb = NULL; fifo->active = 0; } @@ -1219,11 +1214,11 @@ usb_init(hfcusb_data * hfc) /* aux = output, reset off */ write_usb(hfc, HFCUSB_CIRM, 0x10); - /* set USB_SIZE to match the the wMaxPacketSize for INT or BULK transfers */ + /* set USB_SIZE to match the wMaxPacketSize for INT or BULK transfers */ write_usb(hfc, HFCUSB_USB_SIZE, (hfc->packet_size / 8) | ((hfc->packet_size / 8) << 4)); - /* set USB_SIZE_I to match the the wMaxPacketSize for ISO transfers */ + /* set USB_SIZE_I to match the wMaxPacketSize for ISO transfers */ write_usb(hfc, HFCUSB_USB_SIZE_I, hfc->iso_packet_size); /* enable PCM/GCI master mode */ @@ -1307,7 +1302,11 @@ usb_init(hfcusb_data * hfc) } /* default Prot: EURO ISDN, should be a module_param */ hfc->protocol = 2; - hisax_register(&hfc->d_if, p_b_if, "hfc_usb", hfc->protocol); + i = hisax_register(&hfc->d_if, p_b_if, "hfc_usb", hfc->protocol); + if (i) { + printk(KERN_INFO "HFC-S USB: hisax_register -> %d\n", i); + return i; + } #ifdef CONFIG_HISAX_DEBUG hfc_debug = debug; @@ -1628,11 +1627,9 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) #endif /* init the chip and register the driver */ if (usb_init(context)) { - if (context->ctrl_urb) { - usb_unlink_urb(context->ctrl_urb); - usb_free_urb(context->ctrl_urb); - context->ctrl_urb = NULL; - } + usb_kill_urb(context->ctrl_urb); + usb_free_urb(context->ctrl_urb); + context->ctrl_urb = NULL; kfree(context); return (-EIO); } @@ -1684,21 +1681,15 @@ hfc_usb_disconnect(struct usb_interface i); #endif } - if (context->fifos[i].urb) { - usb_unlink_urb(context->fifos[i].urb); - usb_free_urb(context->fifos[i].urb); - context->fifos[i].urb = NULL; - } + usb_kill_urb(context->fifos[i].urb); + usb_free_urb(context->fifos[i].urb); + context->fifos[i].urb = NULL; } context->fifos[i].active = 0; } - /* wait for all URBS to terminate */ - mdelay(10); - if (context->ctrl_urb) { - usb_unlink_urb(context->ctrl_urb); - usb_free_urb(context->ctrl_urb); - context->ctrl_urb = NULL; - } + usb_kill_urb(context->ctrl_urb); + usb_free_urb(context->ctrl_urb); + context->ctrl_urb = NULL; hisax_unregister(&context->d_if); kfree(context); /* free our structure again */ } /* hfc_usb_disconnect */