1
linux/drivers/hid
Simon Budig 46386b5870 HID: introduce proper zeroing of unused bits in output reports
Some HID devices are looking on the unused bits in the HID reports they
receive. This is violating the specification, but we want to make those
devices work. Well-behaving devices are unaffected, as they don't care
about the unused bits.

If bitsused % 8 is 0 all bits in data[] get used and we don't need to
clear anything. Otherwise (bitsused % 8) bits of the last byte get used.
By shifting 1 for (bitsused % 8) bits and subtracting 1 we create a mask
consisting of (bitsused % 8) ones and remaining zeroes. By ANDing we
clear the upper unused bits.

Signed-off-by: Simon Budig <simon@budig.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-11 10:36:36 +02:00
..
hid-core.c HID: introduce proper zeroing of unused bits in output reports 2007-04-11 10:36:36 +02:00
hid-debug.c HID: hid-debug.c should #include <linux/hid-debug.h> 2007-03-01 09:52:42 +01:00
hid-input.c HID: fix Logitech DiNovo Edge touchwheel and Logic3 /SpectraVideo middle button 2007-03-01 09:54:44 +01:00
Kconfig HID: hid debug from hid-debug.h to hid layer 2007-02-05 10:00:38 +01:00
Makefile HID: move away from DEBUG defines in favor of CONFIG_HID_DEBUG 2007-02-05 10:00:45 +01:00