|
@@ -999,13 +999,6 @@ static int usbhid_start(struct hid_device *hid)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- init_waitqueue_head(&usbhid->wait);
|
|
|
|
- INIT_WORK(&usbhid->reset_work, hid_reset);
|
|
|
|
- INIT_WORK(&usbhid->restart_work, __usbhid_restart_queues);
|
|
|
|
- setup_timer(&usbhid->io_retry, hid_retry_timeout, (unsigned long) hid);
|
|
|
|
-
|
|
|
|
- spin_lock_init(&usbhid->lock);
|
|
|
|
-
|
|
|
|
usbhid->urbctrl = usb_alloc_urb(0, GFP_KERNEL);
|
|
usbhid->urbctrl = usb_alloc_urb(0, GFP_KERNEL);
|
|
if (!usbhid->urbctrl) {
|
|
if (!usbhid->urbctrl) {
|
|
ret = -ENOMEM;
|
|
ret = -ENOMEM;
|
|
@@ -1179,6 +1172,12 @@ static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *
|
|
usbhid->intf = intf;
|
|
usbhid->intf = intf;
|
|
usbhid->ifnum = interface->desc.bInterfaceNumber;
|
|
usbhid->ifnum = interface->desc.bInterfaceNumber;
|
|
|
|
|
|
|
|
+ init_waitqueue_head(&usbhid->wait);
|
|
|
|
+ INIT_WORK(&usbhid->reset_work, hid_reset);
|
|
|
|
+ INIT_WORK(&usbhid->restart_work, __usbhid_restart_queues);
|
|
|
|
+ setup_timer(&usbhid->io_retry, hid_retry_timeout, (unsigned long) hid);
|
|
|
|
+ spin_lock_init(&usbhid->lock);
|
|
|
|
+
|
|
ret = hid_add_device(hid);
|
|
ret = hid_add_device(hid);
|
|
if (ret) {
|
|
if (ret) {
|
|
if (ret != -ENODEV)
|
|
if (ret != -ENODEV)
|