#include <linux/slab.h>
#include <linux/types.h>
#include <linux/errno.h>
-#include <linux/timer.h>
#include <linux/device.h>
#include <linux/firmware.h>
#define BT_DBG(D...)
#endif
-#define VERSION "1.0"
+#define VERSION "1.1"
static int ignore = 0;
unsigned long state;
- struct timer_list timer;
+ struct work_struct work;
struct urb *urb;
unsigned char *buffer;
data->state = BCM203X_SELECT_MEMORY;
- mod_timer(&data->timer, jiffies + (HZ / 10));
+ schedule_work(&data->work);
break;
case BCM203X_SELECT_MEMORY:
}
}
-static void bcm203x_timer(unsigned long user_data)
+static void bcm203x_work(void *user_data)
{
- struct bcm203x_data *data = (struct bcm203x_data *) user_data;
+ struct bcm203x_data *data = user_data;
if (usb_submit_urb(data->urb, GFP_ATOMIC) < 0)
BT_ERR("Can't submit URB");
release_firmware(firmware);
- init_timer(&data->timer);
- data->timer.function = bcm203x_timer;
- data->timer.data = (unsigned long) data;
+ INIT_WORK(&data->work, bcm203x_work, (void *) data);
usb_set_intfdata(intf, data);
- mod_timer(&data->timer, jiffies + HZ);
+ schedule_work(&data->work);
return 0;
}