]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/hid/hid-elo.c
HID: logitech: Fix general protection fault caused by Logitech driver
[mirror_ubuntu-bionic-kernel.git] / drivers / hid / hid-elo.c
index 0cd4f72162394b5652fc529681cfbc8774b50a36..5eea6fe0d7bd8181082599a4ed0f05eda3268d5c 100644 (file)
@@ -42,6 +42,12 @@ static int elo_input_configured(struct hid_device *hdev,
 {
        struct input_dev *input = hidinput->input;
 
+       /*
+        * ELO devices have one Button usage in GenDesk field, which makes
+        * hid-input map it to BTN_LEFT; that confuses userspace, which then
+        * considers the device to be a mouse/touchpad instead of touchscreen.
+        */
+       clear_bit(BTN_LEFT, input->keybit);
        set_bit(BTN_TOUCH, input->keybit);
        set_bit(ABS_PRESSURE, input->absbit);
        input_set_abs_params(input, ABS_PRESSURE, 0, 256, 0, 0);