Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263258
b: refs/heads/master
c: a417ea4
h: refs/heads/master
v: v3
  • Loading branch information
Ping Cheng authored and Dmitry Torokhov committed Aug 16, 2011
1 parent 90477b6 commit 899dd0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: 18adad1c57f820d38d05e3d5e3d548e286233b76
refs/heads/master: a417ea4432db7fd1c91c19b129a3e3d2367b7ce4
7 changes: 4 additions & 3 deletions trunk/drivers/input/tablet/wacom_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ struct hid_descriptor {
#define USB_REQ_GET_REPORT 0x01
#define USB_REQ_SET_REPORT 0x09
#define WAC_HID_FEATURE_REPORT 0x03
#define WAC_MSG_RETRIES 5

static int usb_get_report(struct usb_interface *intf, unsigned char type,
unsigned char id, void *buf, int size)
Expand Down Expand Up @@ -165,7 +166,7 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi
report,
hid_desc->wDescriptorLength,
5000); /* 5 secs */
} while (result < 0 && limit++ < 5);
} while (result < 0 && limit++ < WAC_MSG_RETRIES);

/* No need to parse the Descriptor. It isn't an error though */
if (result < 0)
Expand Down Expand Up @@ -336,7 +337,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
error = usb_get_report(intf,
WAC_HID_FEATURE_REPORT, report_id,
rep_data, 3);
} while ((error < 0 || rep_data[1] != 4) && limit++ < 5);
} while ((error < 0 || rep_data[1] != 4) && limit++ < WAC_MSG_RETRIES);
} else if (features->type != TABLETPC) {
do {
rep_data[0] = 2;
Expand All @@ -347,7 +348,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
error = usb_get_report(intf,
WAC_HID_FEATURE_REPORT, report_id,
rep_data, 2);
} while ((error < 0 || rep_data[1] != 2) && limit++ < 5);
} while ((error < 0 || rep_data[1] != 2) && limit++ < WAC_MSG_RETRIES);
}

kfree(rep_data);
Expand Down

0 comments on commit 899dd0c

Please sign in to comment.