]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge branch 'for-4.3/upstream' into for-4.3/wacom
authorJiri Kosina <jkosina@suse.com>
Fri, 17 Jul 2015 09:19:37 +0000 (11:19 +0200)
committerJiri Kosina <jkosina@suse.com>
Fri, 17 Jul 2015 09:19:37 +0000 (11:19 +0200)
There is a conflict between 67e123f ("Delete unnecessary checks") sitting
in for-4.3/upstream and memory allocation failure handling from Jason Gerecke.
Pull this so that conflict could be resolved.

Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-input.c
drivers/hid/usbhid/hid-core.c
drivers/hid/wacom_sys.c

index 3511bbaba505a4524ad382297ec1e486e21e7e48..14aebe4832194ab0d3f59e7d2bfdb180bb802b48 100644 (file)
@@ -1163,8 +1163,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)
index bfbe1bedda7f34396db34e85b79c89ee1a251209..1a23d78fe5e70228bfe2db590b58ba794a24d4c2 100644 (file)
@@ -710,7 +710,8 @@ int usbhid_open(struct hid_device *hid)
                 * Wait 50 msec for the queue to empty before allowing events
                 * to go through hid.
                 */
-               msleep(50);
+               if (res == 0 && !(hid->quirks & HID_QUIRK_ALWAYS_POLL))
+                       msleep(50);
                clear_bit(HID_RESUME_RUNNING, &usbhid->iofl);
        }
 done:
index 4c0ffca97befd61cf3cdd947138d14070c4e7895..936ad7770ec3a5eb4849f93bd3e050989d674833 100644 (file)
@@ -1149,12 +1149,9 @@ static void wacom_free_inputs(struct wacom *wacom)
 {
        struct wacom_wac *wacom_wac = &(wacom->wacom_wac);
 
-       if (wacom_wac->pen_input)
-               input_free_device(wacom_wac->pen_input);
-       if (wacom_wac->touch_input)
-               input_free_device(wacom_wac->touch_input);
-       if (wacom_wac->pad_input)
-               input_free_device(wacom_wac->pad_input);
+       input_free_device(wacom_wac->pen_input);
+       input_free_device(wacom_wac->touch_input);
+       input_free_device(wacom_wac->pad_input);
        wacom_wac->pen_input = NULL;
        wacom_wac->touch_input = NULL;
        wacom_wac->pad_input = NULL;