From: Jiri Kosina Date: Wed, 19 Jun 2013 21:52:11 +0000 (+0200) Subject: HID: explain out-of-range check better X-Git-Tag: upstream/snapshot3+hdmi~4779^2~1^4~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a688393bd3fb27690a77f7ae8607b4969039bac5;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git HID: explain out-of-range check better Extend the comment explaining the condition for discarding out-of-range values to clarify the cases in which devices don't provide any logical min/max. Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 82130cf..9aeca60 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -1042,7 +1042,11 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct /* * Ignore out-of-range values as per HID specification, - * section 5.10 and 6.2.25 + * section 5.10 and 6.2.25. + * + * The logical_minimum < logical_maximum check is done so that we + * don't unintentionally discard values sent by devices which + * don't specify logical min and max. */ if ((field->flags & HID_MAIN_ITEM_VARIABLE) && (field->logical_minimum < field->logical_maximum) &&