Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=82eb121989c06e3de33b56ade1fa52c9e86c014e Commit: 82eb121989c06e3de33b56ade1fa52c9e86c014e Parent: 77b296629d6e938e68de40195a9d500f209f6d10 Author: Jiri Kosina <[EMAIL PROTECTED]> AuthorDate: Sat Aug 11 23:39:42 2007 +0200 Committer: Jiri Kosina <[EMAIL PROTECTED]> CommitDate: Sun Oct 14 13:40:01 2007 +0200
HID: ignore all non-LED usages in output fields in hid-input We have to ignore all non-LED usages in output fields if the report descriptor of the device specifies any. If we don't do so, the devices which contain the same usages both in input and output reports with different parameters will mess things up. In hid-input, we currently care only for the input usages, with exception for LEDs. All other output usages should be properly handled by appropriate force-feedback driver. Fixes auto-calibration for Saitek Cyborg Evo Force joystick. Reported-by: Renato Golin <[EMAIL PROTECTED]> Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]> --- drivers/hid/hid-input.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index de8dbec..f80b571 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -355,6 +355,13 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel if (field->flags & HID_MAIN_ITEM_CONSTANT) goto ignore; + /* only LED usages are supported in output fields */ + if (field->report_type == HID_OUTPUT_REPORT && + (usage->hid & HID_USAGE_PAGE) != HID_UP_LED) { + dbg_hid_line(" [non-LED output field] "); + goto ignore; + } + switch (usage->hid & HID_USAGE_PAGE) { case HID_UP_UNDEFINED: - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html