lkml.org 
[lkml]   [2018]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC/PATCH] Input: make input_report_slot_state() return boolean
On Tue, Jun 5, 2018 at 7:16 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> Let's make input_report_slot_state() return boolean representing whether
> the contact is active or not. This will allow writing code like:
>
> if (input_mt_report_slot_state(input, obj->mt_tool,
> obj->type != RMI_2D_OBJECT_NONE) {
>
> input_event(sensor->input, EV_ABS, ABS_MT_POSITION_X, obj->x);
> input_event(sensor->input, EV_ABS, ABS_MT_POSITION_Y, obj->y);
> ...
> }
>
> instead of:
>
> input_mt_report_slot_state(input, obj->mt_tool,
> obj->type != RMI_2D_OBJECT_NONE);
> if (obj->type != RMI_2D_OBJECT_NONE) {
> input_event(sensor->input, EV_ABS, ABS_MT_POSITION_X, obj->x);
> input_event(sensor->input, EV_ABS, ABS_MT_POSITION_Y, obj->y);
> ...
> }
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---

Looks good to me as well.

In case you still need it:
Acked-by: Benjamin Tissoires <benjamin.tissoires@redaht.com>

Cheers,
Benjamin

\
 
 \ /
  Last update: 2018-06-06 16:46    [W:0.028 / U:3.552 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site