On Sun, Mar 06, 2005 at 09:56:24AM -0500, Adam Kropelin wrote: > hid-core contains the following bit of code in hid_input_report: > > if (hid->claimed & HID_CLAIMED_HIDDEV) > hiddev_report_event(hid, report); > > for (n = 0; n < report->maxfield; n++) > hid_input_field(hid, report->field[n], data, regs); > > if (hid->claimed & HID_CLAIMED_INPUT) > hidinput_report_event(hid, report); > > >From this, it seems that hiddev is notified of the report before the > fields of the report have been updated with new values. This isn't a > problem since hiddev cares only that the report changed, not what its > value is. > > It feels counterintuitive, though, and some unsuspecting soul might > change hiddev such that it wants the value immediately. Is the current > behavior by design? Well, right now an application using hiddev gets the report arrival event first, and then all value change events after that. It seems counterintuitive, but I don't think we can change it without breaking applications.
Honestly, hiddev needs to be killed and replaced by something which just passes reports around instead of trying to decode them in the kernel. -- Vojtech Pavlik SuSE Labs, SuSE CR ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel