Skip to content

Commit

Permalink
HID: explain the signed/unsigned handling in hid_add_field()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Kosina committed May 14, 2012
1 parent 0cd516c commit bb2e197
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
Expand Down

0 comments on commit bb2e197

Please sign in to comment.