]> git.baikalelectronics.ru Git - kernel.git/commit
HID: wacom: Replace magic masks and comparisons with switch cases
authorJason Gerecke <killertofu@gmail.com>
Tue, 1 Dec 2015 01:13:49 +0000 (17:13 -0800)
committerJiri Kosina <jkosina@suse.cz>
Wed, 2 Dec 2015 20:44:51 +0000 (21:44 +0100)
commitea69283121a004dba44fae052288f8e7927fbeee
tree2198bd8c74b84615b52c865f93a4be112b1a94fe
parentc9be5fecc1152b5273a9251314c1ebc82a69d30c
HID: wacom: Replace magic masks and comparisons with switch cases

Reasoning through the conditions under which a particular block of code
in 'wacom_intuos_general' will be reached is not at all easy due to the
sheer number of magic masks and comparisons. Remove these and replace
them with a switch statement over the various 'types' of packets that
will be encountered.

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