Input: edt-ft5x06 - simplify event reporting code

Now that input_mt_report_slot_state() returns true if slot is active we no
longer need a temporary for the slot state.

Tested-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

+4 -9
+4 -9
drivers/input/touchscreen/edt-ft5x06.c
··· 229 229 230 230 for (i = 0; i < tsdata->max_support_points; i++) { 231 231 u8 *buf = &rdbuf[i * tplen + offset]; 232 - bool down; 233 232 234 233 type = buf[0] >> 6; 235 234 /* ignore Reserved events */ ··· 246 247 swap(x, y); 247 248 248 249 id = (buf[2] >> 4) & 0x0f; 249 - down = type != TOUCH_EVENT_UP; 250 250 251 251 input_mt_slot(tsdata->input, id); 252 - input_mt_report_slot_state(tsdata->input, MT_TOOL_FINGER, down); 253 - 254 - if (!down) 255 - continue; 256 - 257 - touchscreen_report_pos(tsdata->input, &tsdata->prop, x, y, 258 - true); 252 + if (input_mt_report_slot_state(tsdata->input, MT_TOOL_FINGER, 253 + type != TOUCH_EVENT_UP)) 254 + touchscreen_report_pos(tsdata->input, &tsdata->prop, 255 + x, y, true); 259 256 } 260 257 261 258 input_mt_report_pointer_emulation(tsdata->input, true);