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().

Change-Id: I3c701f063aace2b08dadd1bcd668dd65036e9d07
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
This commit is contained in:
Jiri Kosina
2019-08-08 16:37:25 +02:00
committed by Francescodario Cuzzocrea
parent f6674f8bc3
commit 8a2f16b6eb
+1
View File
@@ -232,6 +232,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) ||