lkml.org 
[lkml]   [2019]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] Input: edt-ft5x06 - simplify event reporting code
On Sun, Jun 23, 2019 at 9:31 AM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
>
> Now that input_mt_report_slot_state() returns true if slot is active we no
> longer need a temporary for the slot state.


> - down = type != TOUCH_EVENT_UP;
>
> input_mt_slot(tsdata->input, id);
> - input_mt_report_slot_state(tsdata->input, MT_TOOL_FINGER, down);

> + if (input_mt_report_slot_state(tsdata->input, MT_TOOL_FINGER,
> + type != TOUCH_EVENT_UP))

Can't we simple do somethink like
- down = type != TOUCH_EVENT_UP;
+ down = input_mt_report_slot_state(tsdata->input,
MT_TOOL_FINGER, type != TOUCH_EVENT_UP);

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2019-06-23 09:59    [W:2.658 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site