summaryrefslogtreecommitdiff
path: root/include/linux/input/mt.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2018-06-05 10:08:44 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2018-06-11 10:21:06 -0700
commitbf6247a70f2b7569180304041b63b59ab14217bc (patch)
treec125ed31db1afc366437d35a4c5bf1db6272dbbc /include/linux/input/mt.h
parent645a397d325db6e1bb36588095ae637738b37693 (diff)
Input: make input_report_slot_state() return boolean
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); ... } Reviewed-by: Henrik Rydberg <rydberg@bitmath.org> Acked-by: Benjamin Tissoires <benjamin.tissoires@redaht.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'include/linux/input/mt.h')
-rw-r--r--include/linux/input/mt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h
index d7188de4db96..3f4bf60b0bb5 100644
--- a/include/linux/input/mt.h
+++ b/include/linux/input/mt.h
@@ -100,7 +100,7 @@ static inline bool input_is_mt_axis(int axis)
return axis == ABS_MT_SLOT || input_is_mt_value(axis);
}
-void input_mt_report_slot_state(struct input_dev *dev,
+bool input_mt_report_slot_state(struct input_dev *dev,
unsigned int tool_type, bool active);
void input_mt_report_finger_count(struct input_dev *dev, int count);