Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-drm-fsl-dcu.git] / drivers / usb / input / hid-input.c
index 68e7ebb978a9721c0eb13ce6d0d4710c00d78c42..3a7e5fbff025f20a6cbad8a1594476bebb24d7c4 100644 (file)
@@ -581,6 +581,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
                || ((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007)))
                goto ignore;
 
+       if ((device->quirks & HID_QUIRK_BAD_RELATIVE_KEYS) &&
+           usage->type == EV_KEY && (field->flags & HID_MAIN_ITEM_RELATIVE))
+               field->flags &= ~HID_MAIN_ITEM_RELATIVE;
+
        set_bit(usage->type, input->evbit);
 
        while (usage->code <= max && test_and_set_bit(usage->code, bit))