From 29807d1e24b7cd696442d2f600057230f084b3c7 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Wed, 14 Nov 2012 16:59:22 +0100 Subject: 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 Reviewed-by: Henrik Rydberg Signed-off-by: Jiri Kosina --- drivers/input/input-mt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/input-mt.c') diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c index c0ec7d42c3be..475b9d424eed 100644 --- a/drivers/input/input-mt.c +++ b/drivers/input/input-mt.c @@ -247,7 +247,7 @@ void input_mt_sync_frame(struct input_dev *dev) if (mt->flags & INPUT_MT_DROP_UNUSED) { for (s = mt->slots; s != mt->slots + mt->num_slots; s++) { - if (s->frame == mt->frame) + if (input_mt_is_used(mt, s)) continue; input_mt_slot(dev, s - mt->slots); input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, -1); -- cgit v1.2.3-59-g8ed1b