Input_event_flag duplicates the information we track in wacom_wac->hid_data.inrange_state for the pad.
Signed-off-by: Aaron Skomra <aaron.sko...@wacom.com> Reviewed-by: Ping Cheng <pi...@wacom.com> Signed-off-by: Jiri Kosina <jkos...@suse.cz> [aaron.sko...@wacom.com: Imported into input-wacom repository (65ef4c1)] Signed-off-by: Aaron Armstrong Skomra <aaron.sko...@wacom.com> [aaron.sko...@wacom.com: Backported from input-wacom repository (f0725f3)] Signed-off-by: Aaron Armstrong Skomra <aaron.sko...@wacom.com> --- 3.17/wacom_wac.c | 9 +-------- 3.17/wacom_wac.h | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/3.17/wacom_wac.c b/3.17/wacom_wac.c index ad4ea52..5cb86ee 100644 --- a/3.17/wacom_wac.c +++ b/3.17/wacom_wac.c @@ -1783,7 +1783,6 @@ static void wacom_wac_pad_event(struct hid_device *hdev, struct hid_field *field struct wacom *wacom = hid_get_drvdata(hdev); struct wacom_wac *wacom_wac = &wacom->wacom_wac; struct input_dev *input = wacom_wac->pad_input; - struct wacom_features *features = &wacom_wac->features; unsigned equivalent_usage = wacom_equivalent_usage(usage->hid); if (wacom_equivalent_usage(field->physical) == HID_DG_TABLETFUNCTIONKEY) { @@ -1795,7 +1794,6 @@ static void wacom_wac_pad_event(struct hid_device *hdev, struct hid_field *field break; default: - features->input_event_flag = true; input_event(input, usage->type, usage->code, value); break; } @@ -1833,20 +1831,15 @@ static void wacom_wac_pad_report(struct hid_device *hdev, { struct wacom *wacom = hid_get_drvdata(hdev); struct wacom_wac *wacom_wac = &wacom->wacom_wac; - struct wacom_features *features = &wacom_wac->features; struct input_dev *input = wacom_wac->pad_input; bool active = wacom_wac->hid_data.inrange_state != 0; /* report prox for expresskey events */ if (wacom_equivalent_usage(report->field[0]->physical) == HID_DG_TABLETFUNCTIONKEY) { - features->input_event_flag = true; input_event(input, EV_ABS, ABS_MISC, active ? PAD_DEVICE_ID : 0); - } - - if (features->input_event_flag) { - features->input_event_flag = false; input_sync(input); } + } static void wacom_wac_pen_usage_mapping(struct hid_device *hdev, diff --git a/3.17/wacom_wac.h b/3.17/wacom_wac.h index 76dda30..1937664 100644 --- a/3.17/wacom_wac.h +++ b/3.17/wacom_wac.h @@ -259,7 +259,6 @@ struct wacom_features { int pktlen; bool check_for_hid_type; int hid_type; - bool input_event_flag; }; struct wacom_shared { -- 2.7.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel