Input: mt: add input_mt_is_used
This patch extracts the test (slot->frame == mt->frame) so that it can be used in third party drivers. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:

committed by
Jiri Kosina

parent
af8036dd74
commit
29807d1e24
@@ -69,6 +69,12 @@ static inline bool input_mt_is_active(const struct input_mt_slot *slot)
|
||||
return input_mt_get_value(slot, ABS_MT_TRACKING_ID) >= 0;
|
||||
}
|
||||
|
||||
static inline bool input_mt_is_used(const struct input_mt *mt,
|
||||
const struct input_mt_slot *slot)
|
||||
{
|
||||
return slot->frame == mt->frame;
|
||||
}
|
||||
|
||||
int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots,
|
||||
unsigned int flags);
|
||||
void input_mt_destroy_slots(struct input_dev *dev);
|
||||
|
Reference in New Issue
Block a user