summaryrefslogtreecommitdiff
path: root/include/linux/hid.h
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>2012-11-14 16:59:15 +0100
committerJiri Kosina <jkosina@suse.cz>2012-11-15 10:07:55 +0100
commit774638386826621c984ab6994439f474709cac5e (patch)
tree897fb8a15947768f7dc9521027c7c20fe830c1bf /include/linux/hid.h
parentccdd699411b77c463022ebac311eb4a06ca56db4 (diff)
downloadlwn-774638386826621c984ab6994439f474709cac5e.tar.gz
lwn-774638386826621c984ab6994439f474709cac5e.zip
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>
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r--include/linux/hid.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index c6bef8f54a82..4161bf2c0b5b 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -717,6 +717,7 @@ int hid_connect(struct hid_device *hid, unsigned int connect_mask);
void hid_disconnect(struct hid_device *hid);
const struct hid_device_id *hid_match_id(struct hid_device *hdev,
const struct hid_device_id *id);
+s32 hid_snto32(__u32 value, unsigned n);
/**
* hid_map_usage - map usage input bits