Skip to content

Commit

Permalink
HID: fix unit exponent parsing
Browse files Browse the repository at this point in the history
HID spec details special values for the HID field unit exponent.
Basically, the range [0x8..0xf] correspond to [-8..-1], so this is
a standard two's complement on a half-byte.

Signed-off-by: Benjamin Tissoires <[email protected]>
Acked-by: Jiri Kosina <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
bentiss authored and Jiri Kosina committed Nov 15, 2012
1 parent ccdd699 commit 7746383
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
16 changes: 15 additions & 1 deletion drivers/hid/hid-core.c
13 changes: 9 additions & 4 deletions drivers/hid/hid-input.c
1 change: 1 addition & 0 deletions include/linux/hid.h

0 comments on commit 7746383

Please sign in to comment.