diff options
Diffstat (limited to 'drivers/isdn/hisax/hfc_usb.c')
-rw-r--r-- | drivers/isdn/hisax/hfc_usb.c | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c index 1f18f1993387..b1a26e02df02 100644 --- a/drivers/isdn/hisax/hfc_usb.c +++ b/drivers/isdn/hisax/hfc_usb.c | |||
@@ -485,7 +485,6 @@ fill_isoc_urb(struct urb *urb, struct usb_device *dev, unsigned int pipe, | |||
485 | { | 485 | { |
486 | int k; | 486 | int k; |
487 | 487 | ||
488 | spin_lock_init(&urb->lock); | ||
489 | urb->dev = dev; | 488 | urb->dev = dev; |
490 | urb->pipe = pipe; | 489 | urb->pipe = pipe; |
491 | urb->complete = complete; | 490 | urb->complete = complete; |
@@ -578,16 +577,14 @@ stop_isoc_chain(usb_fifo * fifo) | |||
578 | "HFC-S USB: Stopping iso chain for fifo %i.%i", | 577 | "HFC-S USB: Stopping iso chain for fifo %i.%i", |
579 | fifo->fifonum, i); | 578 | fifo->fifonum, i); |
580 | #endif | 579 | #endif |
581 | usb_unlink_urb(fifo->iso[i].purb); | 580 | usb_kill_urb(fifo->iso[i].purb); |
582 | usb_free_urb(fifo->iso[i].purb); | 581 | usb_free_urb(fifo->iso[i].purb); |
583 | fifo->iso[i].purb = NULL; | 582 | fifo->iso[i].purb = NULL; |
584 | } | 583 | } |
585 | } | 584 | } |
586 | if (fifo->urb) { | 585 | usb_kill_urb(fifo->urb); |
587 | usb_unlink_urb(fifo->urb); | 586 | usb_free_urb(fifo->urb); |
588 | usb_free_urb(fifo->urb); | 587 | fifo->urb = NULL; |
589 | fifo->urb = NULL; | ||
590 | } | ||
591 | fifo->active = 0; | 588 | fifo->active = 0; |
592 | } | 589 | } |
593 | 590 | ||
@@ -1305,7 +1302,11 @@ usb_init(hfcusb_data * hfc) | |||
1305 | } | 1302 | } |
1306 | /* default Prot: EURO ISDN, should be a module_param */ | 1303 | /* default Prot: EURO ISDN, should be a module_param */ |
1307 | hfc->protocol = 2; | 1304 | hfc->protocol = 2; |
1308 | hisax_register(&hfc->d_if, p_b_if, "hfc_usb", hfc->protocol); | 1305 | i = hisax_register(&hfc->d_if, p_b_if, "hfc_usb", hfc->protocol); |
1306 | if (i) { | ||
1307 | printk(KERN_INFO "HFC-S USB: hisax_register -> %d\n", i); | ||
1308 | return i; | ||
1309 | } | ||
1309 | 1310 | ||
1310 | #ifdef CONFIG_HISAX_DEBUG | 1311 | #ifdef CONFIG_HISAX_DEBUG |
1311 | hfc_debug = debug; | 1312 | hfc_debug = debug; |
@@ -1626,11 +1627,9 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1626 | #endif | 1627 | #endif |
1627 | /* init the chip and register the driver */ | 1628 | /* init the chip and register the driver */ |
1628 | if (usb_init(context)) { | 1629 | if (usb_init(context)) { |
1629 | if (context->ctrl_urb) { | 1630 | usb_kill_urb(context->ctrl_urb); |
1630 | usb_unlink_urb(context->ctrl_urb); | 1631 | usb_free_urb(context->ctrl_urb); |
1631 | usb_free_urb(context->ctrl_urb); | 1632 | context->ctrl_urb = NULL; |
1632 | context->ctrl_urb = NULL; | ||
1633 | } | ||
1634 | kfree(context); | 1633 | kfree(context); |
1635 | return (-EIO); | 1634 | return (-EIO); |
1636 | } | 1635 | } |
@@ -1682,21 +1681,15 @@ hfc_usb_disconnect(struct usb_interface | |||
1682 | i); | 1681 | i); |
1683 | #endif | 1682 | #endif |
1684 | } | 1683 | } |
1685 | if (context->fifos[i].urb) { | 1684 | usb_kill_urb(context->fifos[i].urb); |
1686 | usb_unlink_urb(context->fifos[i].urb); | 1685 | usb_free_urb(context->fifos[i].urb); |
1687 | usb_free_urb(context->fifos[i].urb); | 1686 | context->fifos[i].urb = NULL; |
1688 | context->fifos[i].urb = NULL; | ||
1689 | } | ||
1690 | } | 1687 | } |
1691 | context->fifos[i].active = 0; | 1688 | context->fifos[i].active = 0; |
1692 | } | 1689 | } |
1693 | /* wait for all URBS to terminate */ | 1690 | usb_kill_urb(context->ctrl_urb); |
1694 | mdelay(10); | 1691 | usb_free_urb(context->ctrl_urb); |
1695 | if (context->ctrl_urb) { | 1692 | context->ctrl_urb = NULL; |
1696 | usb_unlink_urb(context->ctrl_urb); | ||
1697 | usb_free_urb(context->ctrl_urb); | ||
1698 | context->ctrl_urb = NULL; | ||
1699 | } | ||
1700 | hisax_unregister(&context->d_if); | 1693 | hisax_unregister(&context->d_if); |
1701 | kfree(context); /* free our structure again */ | 1694 | kfree(context); /* free our structure again */ |
1702 | } /* hfc_usb_disconnect */ | 1695 | } /* hfc_usb_disconnect */ |