diff options
author | Jiri Kosina <jkosina@suse.cz> | 2012-05-14 09:02:56 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-05-14 09:02:56 -0400 |
commit | bb2e19769533cc7c11257c67690358473099be9a (patch) | |
tree | 3dad5b2a083c964a6b9d74d0041d9530cde812bd /drivers/hid/hid-core.c | |
parent | 0cd516c246759bb57b69d836b625d8f8c566e8ca (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/hid-core.c')
-rw-r--r-- | drivers/hid/hid-core.c | 1 |
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 | |||
230 | return -1; | 230 | return -1; |
231 | } | 231 | } |
232 | 232 | ||
233 | /* Handle both signed and unsigned cases properly */ | ||
233 | if ((parser->global.logical_minimum < 0 && | 234 | if ((parser->global.logical_minimum < 0 && |
234 | parser->global.logical_maximum < | 235 | parser->global.logical_maximum < |
235 | parser->global.logical_minimum) || | 236 | parser->global.logical_minimum) || |