aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid/usbhid
diff options
context:
space:
mode:
authorPete Zaitcev <zaitcev@redhat.com>2010-04-12 12:16:11 -0600
committerJiri Kosina <jkosina@suse.cz>2010-04-13 15:55:49 +0200
commit75c28df87eb6d8e1389af67f26fbe2394e28385e (patch)
tree1a798db8c77e301508d26e8e10c1b1974bdef749 /drivers/hid/usbhid
parent6dec143a50c01ca0cc0afcbf5ea4bb8e87981edf (diff)
HID: non-overlapping zeroing of extra bits
From my review of the way the unused bits of report are being zeroed, it seems like there must be a bug. Currently, the zeroing is done in hid_output_field and it covers any bits between the last used bit and the end of the byte. But in case of, say, my keyboard, NumLock is mask 0x01 and CapsLock is 0x02. Invoking hid_output_field for NumLock definitely zeroes across CapsLock. The only reason this works is that the fields are sorted by the offset. It would be more correct and simpler to zero-fill the buffer into which the fields are set. The patch is tested with an IBM keyboard that is improperly sensitive to out-of-report pad bits, the extra bits are still zeroed and the fields continue to work as expected. It is also tested with good keyboards. In case, a related bug in RHEL 5 is tracked with Red Hat bug 513934. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid')
0 files changed, 0 insertions, 0 deletions