summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2012-05-14 15:02:56 +0200
committerJiri Kosina <jkosina@suse.cz>2012-05-14 15:02:56 +0200
commitbb2e19769533cc7c11257c67690358473099be9a (patch)
tree3dad5b2a083c964a6b9d74d0041d9530cde812bd /drivers/hid
parent0cd516c246759bb57b69d836b625d8f8c566e8ca (diff)
HID: explain the signed/unsigned handling in hid_add_field()
Put a comment that clarifies the condition that handles both signed and unsigned case for logical min/max in hid_add_field(). Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 0bfbc4813ad0..dc05d9b5022b 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -230,6 +230,7 @@ static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsign
return -1;
}
+ /* Handle both signed and unsigned cases properly */
if ((parser->global.logical_minimum < 0 &&
parser->global.logical_maximum <
parser->global.logical_minimum) ||