projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cd516c
)
HID: explain the signed/unsigned handling in hid_add_field()
author
Jiri Kosina
<jkosina@suse.cz>
Mon, 14 May 2012 13:02:56 +0000
(15:02 +0200)
committer
Jiri Kosina
<jkosina@suse.cz>
Mon, 14 May 2012 13:02:56 +0000
(15:02 +0200)
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>
drivers/hid/hid-core.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hid/hid-core.c
b/drivers/hid/hid-core.c
index 0bfbc4813ad02b5afbc6eab2e772552d1b7a8227..dc05d9b5022be8aad421136dba69353dc5376c24 100644
(file)
--- 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) ||