mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
commit
57f7e160a1
|
@ -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);
|
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);
|
input_event(input, usage->type, usage->code, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void hidinput_report_event(struct hid_device *hid, struct hid_report *report)
|
void hidinput_report_event(struct hid_device *hid, struct hid_report *report)
|
||||||
|
|
|
@ -710,6 +710,7 @@ int usbhid_open(struct hid_device *hid)
|
||||||
* Wait 50 msec for the queue to empty before allowing events
|
* Wait 50 msec for the queue to empty before allowing events
|
||||||
* to go through hid.
|
* to go through hid.
|
||||||
*/
|
*/
|
||||||
|
if (res == 0 && !(hid->quirks & HID_QUIRK_ALWAYS_POLL))
|
||||||
msleep(50);
|
msleep(50);
|
||||||
clear_bit(HID_RESUME_RUNNING, &usbhid->iofl);
|
clear_bit(HID_RESUME_RUNNING, &usbhid->iofl);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1149,11 +1149,8 @@ static void wacom_free_inputs(struct wacom *wacom)
|
||||||
{
|
{
|
||||||
struct wacom_wac *wacom_wac = &(wacom->wacom_wac);
|
struct wacom_wac *wacom_wac = &(wacom->wacom_wac);
|
||||||
|
|
||||||
if (wacom_wac->pen_input)
|
|
||||||
input_free_device(wacom_wac->pen_input);
|
input_free_device(wacom_wac->pen_input);
|
||||||
if (wacom_wac->touch_input)
|
|
||||||
input_free_device(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->pad_input);
|
||||||
wacom_wac->pen_input = NULL;
|
wacom_wac->pen_input = NULL;
|
||||||
wacom_wac->touch_input = NULL;
|
wacom_wac->touch_input = NULL;
|
||||||
|
|
Loading…
Reference in New Issue