mtd: davinci nand: update clock naming
[safe/jmp/linux-2.6] / drivers / bluetooth / bcm203x.c
index 67cdda4..eafd4af 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/slab.h>
 #include <linux/types.h>
 #include <linux/errno.h>
-#include <linux/timer.h>
 
 #include <linux/device.h>
 #include <linux/firmware.h>
 
 #include <net/bluetooth/bluetooth.h>
 
-#ifndef CONFIG_BT_HCIBCM203X_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
-#define VERSION "1.0"
-
-static int ignore = 0;
+#define VERSION "1.2"
 
 static struct usb_device_id bcm203x_table[] = {
        /* Broadcom Blutonium (BCM2033) */
@@ -72,7 +64,7 @@ struct bcm203x_data {
 
        unsigned long           state;
 
-       struct timer_list       timer;
+       struct work_struct      work;
 
        struct urb              *urb;
        unsigned char           *buffer;
@@ -105,7 +97,7 @@ static void bcm203x_complete(struct urb *urb)
 
                data->state = BCM203X_SELECT_MEMORY;
 
-               mod_timer(&data->timer, jiffies + (HZ / 10));
+               schedule_work(&data->work);
                break;
 
        case BCM203X_SELECT_MEMORY:
@@ -158,9 +150,10 @@ static void bcm203x_complete(struct urb *urb)
        }
 }
 
-static void bcm203x_timer(unsigned long user_data)
+static void bcm203x_work(struct work_struct *work)
 {
-       struct bcm203x_data *data = (struct bcm203x_data *) user_data;
+       struct bcm203x_data *data =
+               container_of(work, struct bcm203x_data, work);
 
        if (usb_submit_urb(data->urb, GFP_ATOMIC) < 0)
                BT_ERR("Can't submit URB");
@@ -175,7 +168,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
 
        BT_DBG("intf %p id %p", intf, id);
 
-       if (ignore || (intf->cur_altsetting->desc.bInterfaceNumber != 0))
+       if (intf->cur_altsetting->desc.bInterfaceNumber != 0)
                return -ENODEV;
 
        data = kzalloc(sizeof(*data), GFP_KERNEL);
@@ -201,7 +194,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
                return -EIO;
        }
 
-       BT_DBG("minidrv data %p size %d", firmware->data, firmware->size);
+       BT_DBG("minidrv data %p size %zu", firmware->data, firmware->size);
 
        size = max_t(uint, firmware->size, 4096);
 
@@ -229,7 +222,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
                return -EIO;
        }
 
-       BT_DBG("firmware data %p size %d", firmware->data, firmware->size);
+       BT_DBG("firmware data %p size %zu", firmware->data, firmware->size);
 
        data->fw_data = kmalloc(firmware->size, GFP_KERNEL);
        if (!data->fw_data) {
@@ -247,13 +240,11 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
 
        release_firmware(firmware);
 
-       init_timer(&data->timer);
-       data->timer.function = bcm203x_timer;
-       data->timer.data = (unsigned long) data;
+       INIT_WORK(&data->work, bcm203x_work);
 
        usb_set_intfdata(intf, data);
 
-       mod_timer(&data->timer, jiffies + HZ);
+       schedule_work(&data->work);
 
        return 0;
 }
@@ -302,10 +293,9 @@ static void __exit bcm203x_exit(void)
 module_init(bcm203x_init);
 module_exit(bcm203x_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("Broadcom Blutonium firmware driver ver " VERSION);
 MODULE_VERSION(VERSION);
 MODULE_LICENSE("GPL");
+MODULE_FIRMWARE("BCM2033-MD.hex");
+MODULE_FIRMWARE("BCM2033-FW.bin");