Skip to content

Commit 5e091a4

Browse files
committed
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.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 4a0467e commit 5e091a4

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/input/touchscreen/zforce_ts.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,8 @@ static int zforce_touch_event(struct zforce_ts *ts, u8 *payload)
386386
/* the zforce id starts with "1", so needs to be decreased */
387387
input_mt_slot(ts->input, point.id - 1);
388388

389-
input_mt_report_slot_state(ts->input, MT_TOOL_FINGER,
390-
point.state != STATE_UP);
391-
392-
if (point.state != STATE_UP) {
389+
if (input_mt_report_slot_state(ts->input, MT_TOOL_FINGER,
390+
point.state != STATE_UP)) {
393391
touchscreen_report_pos(ts->input, &ts->prop,
394392
point.coord_x, point.coord_y,
395393
true);

0 commit comments

Comments
 (0)