From: Bj|rn A. <d3a...@dt...> - 2002-01-22 20:52:47
|
The current HID code sends all output reports over the control pipe to the device. The HID spec states that if an output interrupt pipe is available, it should be used. (The PID spec also mentions this; optput interrupt pipes are optional for HID devices, but mandatory for PID.) Here's a small(ish) patch that fixes that. It also fixes one memory leak, adds some comments, and unlinks all the urbs in the hid_disconnect funtion, instead of just the input one. It also changes some things like - if (!dir) + if (dir == USB_DIR_OUT) { which is IMHO better. (Who knows which direction is "true"?) It also adds two functions: int hid_find_field_in_report(struct hid_report *report, __u32 wanted_usage, struct hid_field **field) int hid_find_report_by_usage(struct hid_device *hid, __u32 wanted_usage, struct hid_report **report, int type) These aren't used right now, but I have a PID patch almost ready for submission that does use them. Later tonight or tomorrow, probably. Like the last patch, this one is against 2.4.17+Johann's input-only patch. But it should apply against the 2.5 tree. /August. -- Wrong on most accounts. const Foo *foo; and Foo const *foo; mean the same: foo being a pointer to const Foo. const Foo const *foo; would mean the same but is illegal (double const). You are confusing this with Foo * const foo; and const Foo * const foo; respectively. -David Kastrup, comp.os.linux.development.system |