HID: wacom: Short-circuit processing of touch when it is disabled
authorJason Gerecke <killertofu@gmail.com>
Mon, 19 Jul 2021 20:55:30 +0000 (13:55 -0700)
committerJiri Kosina <jkosina@suse.cz>
Wed, 28 Jul 2021 09:45:40 +0000 (11:45 +0200)
commit5bed0128868ce0e71f243973b3fc7b3bfca902b5
tree4769cb8a78e2d86e88851f825cffcf78ef01eb8b
parentdc9dc864f35dd3b87d52fbe9809773576ac77d32
HID: wacom: Short-circuit processing of touch when it is disabled

Avoid doing unnecessary work when touch is disabled by detecting this
condition and returning early. Note that the probe process sends GET
FEATURE requests to discover e.g. HID_DG_CONTACTMAX, so we can't start
ignoring touch reports until probe finishes.

Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_sys.c
drivers/hid/wacom_wac.c
drivers/hid/wacom_wac.h