Merge tag 'dm-4.3-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
[firefly-linux-kernel-4.4.55.git] / drivers / hid / hid-input.c
index e3c63640df737d5527c6d2609622417a4e03c8d3..53aeaf6252c75a039cb94a13af27fffbb0f2bddb 100644 (file)
@@ -1166,8 +1166,11 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
 
        input_event(input, usage->type, usage->code, value);
 
-       if ((field->flags & HID_MAIN_ITEM_RELATIVE) && (usage->type == EV_KEY))
+       if ((field->flags & HID_MAIN_ITEM_RELATIVE) &&
+           usage->type == EV_KEY && value) {
+               input_sync(input);
                input_event(input, usage->type, usage->code, 0);
+       }
 }
 
 void hidinput_report_event(struct hid_device *hid, struct hid_report *report)