diff options
author | Benjamin Tissoires <benjamin.tissoires@gmail.com> | 2012-11-14 10:59:22 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-11-15 04:16:56 -0500 |
commit | 29807d1e24b7cd696442d2f600057230f084b3c7 (patch) | |
tree | 9fa7122a4c5c7cb6109c092e48a639f57e079b26 /drivers/input | |
parent | af8036dd749fbf4e732161ff0f3874759b73be40 (diff) |
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>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/input-mt.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
247 | 247 | ||
248 | if (mt->flags & INPUT_MT_DROP_UNUSED) { | 248 | if (mt->flags & INPUT_MT_DROP_UNUSED) { |
249 | for (s = mt->slots; s != mt->slots + mt->num_slots; s++) { | 249 | for (s = mt->slots; s != mt->slots + mt->num_slots; s++) { |
250 | if (s->frame == mt->frame) | 250 | if (input_mt_is_used(mt, s)) |
251 | continue; | 251 | continue; |
252 | input_mt_slot(dev, s - mt->slots); | 252 | input_mt_slot(dev, s - mt->slots); |
253 | input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, -1); | 253 | input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, -1); |