aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2015-02-17 14:19:46 -0500
committerJiri Kosina <jkosina@suse.cz>2015-02-18 17:43:15 -0500
commit9a1c001298fd567c0f0776ab54ab9965eeb9019f (patch)
tree4905bf101dbe8696246f1eb929c95217a9ea555a /drivers/hid
parent870fd0f5df4e131467612cc46db46fc3b69fd706 (diff)
HID: wacom: do not directly use input_mt_report_pointer_emulation
input_mt_sync_frame() calls input_mt_report_pointer_emulation() and do some internal steps required to keep in sync the state of the touch within the various reports. Given that we use input_mt_get_slot_by_key() in this driver, it is better to use input_mt_sync_frame(). Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/wacom_wac.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 1a6507999a65..8e806d308755 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -1093,7 +1093,7 @@ static int wacom_24hdt_irq(struct wacom_wac *wacom)
1093 } 1093 }
1094 } 1094 }
1095 } 1095 }
1096 input_mt_report_pointer_emulation(input, true); 1096 input_mt_sync_frame(input);
1097 1097
1098 wacom->num_contacts_left -= contacts_to_send; 1098 wacom->num_contacts_left -= contacts_to_send;
1099 if (wacom->num_contacts_left <= 0) 1099 if (wacom->num_contacts_left <= 0)
@@ -1144,7 +1144,7 @@ static int wacom_mt_touch(struct wacom_wac *wacom)
1144 input_report_abs(input, ABS_MT_POSITION_Y, y); 1144 input_report_abs(input, ABS_MT_POSITION_Y, y);
1145 } 1145 }
1146 } 1146 }
1147 input_mt_report_pointer_emulation(input, true); 1147 input_mt_sync_frame(input);
1148 1148
1149 wacom->num_contacts_left -= contacts_to_send; 1149 wacom->num_contacts_left -= contacts_to_send;
1150 if (wacom->num_contacts_left < 0) 1150 if (wacom->num_contacts_left < 0)
@@ -1176,7 +1176,7 @@ static int wacom_tpc_mt_touch(struct wacom_wac *wacom)
1176 contact_with_no_pen_down_count++; 1176 contact_with_no_pen_down_count++;
1177 } 1177 }
1178 } 1178 }
1179 input_mt_report_pointer_emulation(input, true); 1179 input_mt_sync_frame(input);
1180 1180
1181 /* keep touch state for pen event */ 1181 /* keep touch state for pen event */
1182 wacom->shared->touch_down = (contact_with_no_pen_down_count > 0); 1182 wacom->shared->touch_down = (contact_with_no_pen_down_count > 0);
@@ -1638,7 +1638,7 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)
1638 } 1638 }
1639 } 1639 }
1640 1640
1641 input_mt_report_pointer_emulation(input, true); 1641 input_mt_sync_frame(input);
1642 1642
1643 input_report_key(pad_input, BTN_LEFT, (data[1] & 0x08) != 0); 1643 input_report_key(pad_input, BTN_LEFT, (data[1] & 0x08) != 0);
1644 input_report_key(pad_input, BTN_FORWARD, (data[1] & 0x04) != 0); 1644 input_report_key(pad_input, BTN_FORWARD, (data[1] & 0x04) != 0);
@@ -1728,7 +1728,7 @@ static int wacom_bpt3_touch(struct wacom_wac *wacom)
1728 wacom_bpt3_button_msg(wacom, data + offset); 1728 wacom_bpt3_button_msg(wacom, data + offset);
1729 1729
1730 } 1730 }
1731 input_mt_report_pointer_emulation(input, true); 1731 input_mt_sync_frame(input);
1732 1732
1733 return 1; 1733 return 1;
1734} 1734}