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>
This commit is contained in:
parent
0cd516c246
commit
bb2e197695
1 changed files with 1 additions and 0 deletions
|
@ -230,6 +230,7 @@ static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsign
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Handle both signed and unsigned cases properly */
|
||||||
if ((parser->global.logical_minimum < 0 &&
|
if ((parser->global.logical_minimum < 0 &&
|
||||||
parser->global.logical_maximum <
|
parser->global.logical_maximum <
|
||||||
parser->global.logical_minimum) ||
|
parser->global.logical_minimum) ||
|
||||||
|
|
Loading…
Add table
Reference in a new issue