Re: [RFC/PATCH] Input: make input_report_slot_state() return boolean

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 5, 2018 at 7:16 PM, Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> 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@xxxxxxxxx>
> ---

Looks good to me as well.

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

Cheers,
Benjamin
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux