vserver 1.9.5.x5
[linux-2.6.git] / drivers / bluetooth / bfusb.c
index 79ff338..913f49e 100644 (file)
@@ -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 <marcel@holtmann.org>");
 MODULE_DESCRIPTION("BlueFRITZ! USB driver ver " VERSION);
 MODULE_VERSION(VERSION);