Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3513
b: refs/heads/master
c: 854561b
h: refs/heads/master
i:
  3511: 70fd2f8
v: v3
  • Loading branch information
Vojtech Pavlik authored and Dmitry Torokhov committed May 29, 2005
1 parent a31ea9a commit 663bdff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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: 8608471262ddf4b8ed4120d7211251e8b8dcbda9
refs/heads/master: 854561b019285acf6e98ca9288fef0d034476fec
13 changes: 9 additions & 4 deletions trunk/drivers/usb/input/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,13 @@ int hid_wait_io(struct hid_device *hid)
return 0;
}

static int hid_set_idle(struct usb_device *dev, int ifnum, int report, int idle)
{
usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
HID_REQ_SET_IDLE, USB_TYPE_CLASS | USB_RECIP_INTERFACE, (idle << 8) | report,
ifnum, NULL, 0, USB_CTRL_SET_TIMEOUT);
}

static int hid_get_class_descriptor(struct usb_device *dev, int ifnum,
unsigned char type, void *buf, int size)
{
Expand Down Expand Up @@ -1301,10 +1308,6 @@ void hid_init_reports(struct hid_device *hid)

if (err)
warn("timeout initializing reports\n");

usb_control_msg(hid->dev, usb_sndctrlpipe(hid->dev, 0),
HID_REQ_SET_IDLE, USB_TYPE_CLASS | USB_RECIP_INTERFACE, 0,
hid->ifnum, NULL, 0, USB_CTRL_SET_TIMEOUT);
}

#define USB_VENDOR_ID_WACOM 0x056a
Expand Down Expand Up @@ -1572,6 +1575,8 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
return NULL;
}

hid_set_idle(dev, interface->desc.bInterfaceNumber, 0, 0);

if ((n = hid_get_class_descriptor(dev, interface->desc.bInterfaceNumber, HID_DT_REPORT, rdesc, rsize)) < 0) {
dbg("reading report descriptor failed");
kfree(rdesc);
Expand Down

0 comments on commit 663bdff

Please sign in to comment.