From bb2e19769533cc7c11257c67690358473099be9a Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Mon, 14 May 2012 15:02:56 +0200 Subject: 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 --- drivers/hid/hid-core.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/hid') 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 return -1; } + /* Handle both signed and unsigned cases properly */ if ((parser->global.logical_minimum < 0 && parser->global.logical_maximum < parser->global.logical_minimum) || -- cgit v1.2.3