Skip to content

Commit

Permalink
Merge branch 'for-4.3/upstream' into for-4.3/wacom
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Kosina committed Jul 17, 2015
2 parents 70caee0 + 3eb4351 commit 57f7e16
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
5 changes: 4 additions & 1 deletion drivers/hid/hid-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion drivers/hid/usbhid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 3 additions & 6 deletions drivers/hid/wacom_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 57f7e16

Please sign in to comment.