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)
commita8a09c8597bd301437c30ce0a4b2f511349a90aa
tree2198bd8c74b84615b52c865f93a4be112b1a94fe
parent16e0a6a0d27f01c47e3685a2a5e6dd2a5b0a525f
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