X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fbluetooth%2Fbfusb.c;h=913f49e56a931dbccd61d17ab22753e364d67307;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=79ff338e92e55db115148be6b58a35de3da89a76;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c index 79ff338e9..913f49e56 100644 --- a/drivers/bluetooth/bfusb.c +++ b/drivers/bluetooth/bfusb.c @@ -47,6 +47,8 @@ #define VERSION "1.1" +static int ignore = 0; + static struct usb_driver bfusb_driver; static struct usb_device_id bfusb_table[] = { @@ -123,7 +125,7 @@ static void bfusb_unlink_urbs(struct bfusb *bfusb) while ((skb = skb_dequeue(&bfusb->pending_q))) { urb = ((struct bfusb_scb *) skb->cb)->urb; - usb_unlink_urb(urb); + usb_kill_urb(urb); skb_queue_tail(&bfusb->completed_q, skb); } @@ -655,6 +657,9 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i BT_DBG("intf %p id %p", intf, id); + if (ignore) + return -ENODEV; + /* Check number of endpoints */ if (intf->cur_altsetting->desc.bNumEndpoints < 2) return -EIO; @@ -678,9 +683,9 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i bfusb->udev = udev; bfusb->bulk_in_ep = bulk_in_ep->desc.bEndpointAddress; bfusb->bulk_out_ep = bulk_out_ep->desc.bEndpointAddress; - bfusb->bulk_pkt_size = bulk_out_ep->desc.wMaxPacketSize; + bfusb->bulk_pkt_size = le16_to_cpu(bulk_out_ep->desc.wMaxPacketSize); - bfusb->lock = RW_LOCK_UNLOCKED; + rwlock_init(&bfusb->lock); bfusb->reassembly = NULL; @@ -792,6 +797,9 @@ static void __exit bfusb_exit(void) module_init(bfusb_init); module_exit(bfusb_exit); +module_param(ignore, bool, 0644); +MODULE_PARM_DESC(ignore, "Ignore devices from the matching table"); + MODULE_AUTHOR("Marcel Holtmann "); MODULE_DESCRIPTION("BlueFRITZ! USB driver ver " VERSION); MODULE_VERSION(VERSION);