Commit 5e091a49 authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: zforce_ts - simplify reporting of slot state

input_mt_report_slot_state() returns true if slot is active, so we can
combine checks for point.state != STATE_UP.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-3-dmitry.torokhov@gmail.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 4a0467ed
...@@ -386,10 +386,8 @@ static int zforce_touch_event(struct zforce_ts *ts, u8 *payload) ...@@ -386,10 +386,8 @@ static int zforce_touch_event(struct zforce_ts *ts, u8 *payload)
/* the zforce id starts with "1", so needs to be decreased */ /* the zforce id starts with "1", so needs to be decreased */
input_mt_slot(ts->input, point.id - 1); input_mt_slot(ts->input, point.id - 1);
input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, if (input_mt_report_slot_state(ts->input, MT_TOOL_FINGER,
point.state != STATE_UP); point.state != STATE_UP)) {
if (point.state != STATE_UP) {
touchscreen_report_pos(ts->input, &ts->prop, touchscreen_report_pos(ts->input, &ts->prop,
point.coord_x, point.coord_y, point.coord_x, point.coord_y,
true); true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment