diff options
author | Jiri Kosina <jkosina@suse.cz> | 2012-05-14 15:02:56 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-05-14 15:02:56 +0200 |
commit | bb2e19769533cc7c11257c67690358473099be9a (patch) | |
tree | 3dad5b2a083c964a6b9d74d0041d9530cde812bd /drivers/hid | |
parent | 0cd516c246759bb57b69d836b625d8f8c566e8ca (diff) | |
download | op-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>
Diffstat (limited to 'drivers/hid')
-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 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) || |