summaryrefslogtreecommitdiffstats
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
parent0cd516c246759bb57b69d836b625d8f8c566e8ca (diff)
downloadop-kernel-dev-bb2e19769533cc7c11257c67690358473099be9a.zip
op-kernel-dev-bb2e19769533cc7c11257c67690358473099be9a.tar.gz
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>
-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 0bfbc48..dc05d9b 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) ||
OpenPOWER on IntegriCloud