]> git.karo-electronics.de Git - karo-tx-linux.git/commit
HID: zeroing of bytes in output fields is bogus
authorJiri Kosina <jkosina@suse.cz>
Sun, 15 Apr 2007 20:30:15 +0000 (22:30 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 2 May 2007 00:05:54 +0000 (17:05 -0700)
commit68e26a3dfdc0bd9d5f547761f174072ac6ffd418
tree1b377f52fc4dbed5e2a95bf4466f6644e102cae8
parentd44da5e9d31b3f386db33b50bb16ca4d0734d184
HID: zeroing of bytes in output fields is bogus

HID: zeroing of bytes in output fields is bogus

This patch removes bogus zeroing of unused bits in output reports,
introduced in Simon's patch in commit d4ae650a.
According to the specification, any sane device should not care
about values of unused bits.

What is worse, the zeroing is done in a way which is broken and
might clear certain bits in output reports which are actually
_used_ - a device that has multiple fields with one value of
the size 1 bit each might serve as an example of why this is
bogus - the second call of hid_output_report() would clear the
first bit of report, which has already been set up previously.

This patch will break LEDs on SpaceNavigator, because this device
is broken and takes into account the bits which it shouldn't touch.
The quirk for this particular device will be provided in a separate
patch.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hid/hid-core.c