Update of /cvsroot/linuxconsole/ruby/linux/drivers/usb
In directory usw-pr-cvs1:/tmp/cvs-serv19650/drivers/usb
Modified Files:
hid-core.c
Log Message:
Fixed the hiddev_hid_event call. Number and types of arguments were wrong. The fix comes from the usbdevel tree. Not tried, but it compiles.
Index: hid-core.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/hid-core.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- hid-core.c 10 Mar 2002 12:26:40 -0000 1.48
+++ hid-core.c 9 Apr 2002 21:56:47 -0000 1.49
@@ -745,8 +745,20 @@
if (hid->claimed & HID_CLAIMED_INPUT)
hidinput_hid_event(hid, field, usage, value);
#ifdef CONFIG_USB_HIDDEV
- if (hid->claimed & HID_CLAIMED_HIDDEV)
- hiddev_hid_event(hid, usage->hid, value);
+ if (hid->claimed & HID_CLAIMED_HIDDEV) {
+ struct hiddev_usage_ref uref;
+ unsigned type = field->report_type;
+ uref.report_type =
+ (type == HID_INPUT_REPORT) ? HID_REPORT_TYPE_INPUT :
+ ((type == HID_OUTPUT_REPORT) ? HID_REPORT_TYPE_OUTPUT :
+ ((type == HID_FEATURE_REPORT) ? HID_REPORT_TYPE_FEATURE:0));
+ uref.report_id = field->report->id;
+ uref.field_index = field->index;
+ uref.usage_index = (usage - field->usage);
+ uref.usage_code = usage->hid;
+ uref.value = value;
+ hiddev_hid_event(hid, &uref);
+ }
#endif
}
|