summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.com>2015-07-17 11:19:37 +0200
committerJiri Kosina <jkosina@suse.com>2015-07-17 11:19:37 +0200
commit57f7e160a137f8ddae455f15abed9bdd1b90ab63 (patch)
tree92993f2b4015a21bf645ba4d14e75dd73a624261 /drivers/hid
parent70caee0a3721956a98cb4bfbfa0eaa38c9182e44 (diff)
parent3eb4351af42bd8b6de20daab07b204a85c35248f (diff)
downloadop-kernel-dev-57f7e160a137f8ddae455f15abed9bdd1b90ab63.zip
op-kernel-dev-57f7e160a137f8ddae455f15abed9bdd1b90ab63.tar.gz
Merge branch 'for-4.3/upstream' into for-4.3/wacom
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-input.c5
-rw-r--r--drivers/hid/usbhid/hid-core.c3
-rw-r--r--drivers/hid/wacom_sys.c9
3 files changed, 9 insertions, 8 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 3511bbab..14aebe4 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -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)
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index bfbe1be..1a23d78 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -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:
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 4c0ffca..936ad77 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -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;
OpenPOWER on IntegriCloud