summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/cyttsp4_core.c
diff options
context:
space:
mode:
authorJiada Wang <jiada_wang@mentor.com>2020-05-11 13:12:13 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-05-12 13:18:26 -0700
commit5fc70e350edd30fb22d2f9b4e6d680c5471890ff (patch)
treed8309c519d60b22c752ce7cfb3b7aa72f9c0b66a /drivers/input/touchscreen/cyttsp4_core.c
parentc9c457022b7df2ab515f0424e65445353f91ecad (diff)
Input: introduce input_mt_report_slot_inactive()
input_mt_report_slot_state() ignores "tool" argument when the slot is closed, which has caused a bit of confusion. Let's introduce input_mt_report_slot_inactive() to report inactive slot state. Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiada Wang <jiada_wang@mentor.com> Link: https://lore.kernel.org/r/20200508055656.96389-2-jiada_wang@mentor.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/cyttsp4_core.c')
-rw-r--r--drivers/input/touchscreen/cyttsp4_core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c
index 6bcffc930384..02a73d9a4def 100644
--- a/drivers/input/touchscreen/cyttsp4_core.c
+++ b/drivers/input/touchscreen/cyttsp4_core.c
@@ -744,8 +744,7 @@ static void cyttsp4_report_slot_liftoff(struct cyttsp4_mt_data *md,
for (t = 0; t < max_slots; t++) {
input_mt_slot(md->input, t);
- input_mt_report_slot_state(md->input,
- MT_TOOL_FINGER, false);
+ input_mt_report_slot_inactive(md->input);
}
}
@@ -845,7 +844,7 @@ static void cyttsp4_final_sync(struct input_dev *input, int max_slots, int *ids)
if (ids[t])
continue;
input_mt_slot(input, t);
- input_mt_report_slot_state(input, MT_TOOL_FINGER, false);
+ input_mt_report_slot_inactive(input);
}
input_sync(input);