linux-kernel-test/drivers/input
Jason Gerecke 5866d9e3b7 Input: wacom - use full 32-bit HID Usage value in switch statement
A HID Usage is a 32-bit value: an upper 16-bit "page" and a lower 16-bit
ID. While the two halves are normally reported seperately, only the
combination uniquely idenfifes a particular HID Usage.

The existing code performs the comparison in two steps, first performing a
switch on the ID and then verifying the page within each case. While this
works fine, it is very akward to handle two Usages that share a single ID,
such as HID_USAGE_PRESSURE and HID_USAGE_X because the case statement can
only have a single identifier.

To work around this, we now check the full 32-bit HID Usage directly rather
than first checking the ID and then the page.  This allows the switch
statement to have distinct cases for e.g. HID_USAGE_PRESSURE and
HID_USAGE_X.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Tested-by: Aaron Skomra <Aaron.Skomra@wacom.com>
Reviewed-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-04-19 13:57:34 -07:00
..
gameport Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
joystick Merge branch 'next' into for-linus 2014-01-23 08:10:44 -08:00
keyboard Merge branch 'next' into for-linus 2014-04-03 09:26:49 -07:00
misc Input: da9055_onkey - remove use of regmap_irq_get_virq() 2014-04-19 13:55:41 -07:00
mouse Merge branch 'next' into for-linus 2014-04-03 09:26:49 -07:00
serio Input: olpc_apsp - fix dependencies of OLPC AP-SP driver 2014-03-23 17:26:00 -07:00
tablet Input: wacom - use full 32-bit HID Usage value in switch statement 2014-04-19 13:57:34 -07:00
touchscreen Input: ads7846 - fix device usage within attribute show 2014-04-19 13:55:59 -07:00
apm-power.c
evbug.c
evdev.c Input: don't modify the id of ioctl-provided ff effect on upload failure 2014-03-29 12:13:09 -07:00
ff-core.c
ff-memless.c
input-compat.c
input-compat.h
input-mt.c Input: MT - handle semi-mt devices in core 2013-04-07 21:02:32 -07:00
input-polldev.c
input.c Merge branch 'next' into for-linus 2014-01-23 08:10:44 -08:00
joydev.c
Kconfig Input: mousedev - allow disabling even without CONFIG_EXPERT 2013-10-31 08:46:07 -07:00
Makefile
matrix-keymap.c input: Export matrix_keypad_parse_of_params() 2013-04-19 00:31:13 +02:00
mousedev.c Input: mousedev - fix race when creating mixed device 2014-03-29 14:44:23 -07:00
sparse-keymap.c