]> git.baikalelectronics.ru Git - kernel.git/commit
HID: multitouch: optimize the sticky fingers timer
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Thu, 15 Jun 2017 13:32:05 +0000 (15:32 +0200)
committerJiri Kosina <jkosina@suse.cz>
Fri, 23 Jun 2017 08:16:17 +0000 (10:16 +0200)
commite5b670726aeb8d1a28d2bc5555f4cd87db887781
treef947131dc722f22ea87c3c01fbbfccdc333074da
parent62368ffa7f3e5326b0675677db39f110af0ecf45
HID: multitouch: optimize the sticky fingers timer

Instead of unconditionally expiring the timer and calling a long
mt_release_contacts(), we can check if some slots are used when the
timer expires.

We can also remove the timer if we happen to receive all the releases.

The logic behind the MT_IO_FLAGS_PENDING_SLOTS could be implemented by
counting how many slots are active, but using bits feels slightly more
efficient.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Tested-by: Arek Burdach <arek.burdach@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-multitouch.c