Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119066
b: refs/heads/master
c: 131d3a7
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Slaby authored and Jiri Kosina committed Nov 14, 2008
1 parent 10b85cf commit d30f240
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 62a56582e01b1c5139b235004548e233201df9aa
refs/heads/master: 131d3a7a009d56a96cc7117b4e9d0c90c2e2a1dc
17 changes: 11 additions & 6 deletions trunk/drivers/hid/usbhid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,12 +849,6 @@ static int usbhid_start(struct hid_device *hid)
}
}

if (!usbhid->urbin) {
err_hid("couldn't find an input interrupt endpoint");
ret = -ENODEV;
goto fail;
}

init_waitqueue_head(&usbhid->wait);
INIT_WORK(&usbhid->reset_work, hid_reset);
setup_timer(&usbhid->io_retry, hid_retry_timeout, (unsigned long) hid);
Expand Down Expand Up @@ -948,15 +942,26 @@ static struct hid_ll_driver usb_hid_driver = {

static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id)
{
struct usb_host_interface *interface = intf->cur_altsetting;
struct usb_device *dev = interface_to_usbdev(intf);
struct usbhid_device *usbhid;
struct hid_device *hid;
unsigned int n, has_in = 0;
size_t len;
int ret;

dbg_hid("HID probe called for ifnum %d\n",
intf->altsetting->desc.bInterfaceNumber);

for (n = 0; n < interface->desc.bNumEndpoints; n++)
if (usb_endpoint_is_int_in(&interface->endpoint[n].desc))
has_in++;
if (!has_in) {
dev_err(&intf->dev, "couldn't find an input interrupt "
"endpoint\n");
return -ENODEV;
}

hid = hid_allocate_device();
if (IS_ERR(hid))
return PTR_ERR(hid);
Expand Down

0 comments on commit d30f240

Please sign in to comment.