HID: fix unit exponent parsing
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>
Wed, 14 Nov 2012 15:59:15 +0000 (16:59 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 15 Nov 2012 09:07:55 +0000 (10:07 +0100)
commit774638386826621c984ab6994439f474709cac5e
tree897fb8a15947768f7dc9521027c7c20fe830c1bf
parentccdd699411b77c463022ebac311eb4a06ca56db4
HID: fix unit exponent parsing

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 <benjamin.tissoires@gmail.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c
drivers/hid/hid-input.c
include/linux/hid.h