OSDN Git Service

HID: wacom: Move handling of HID quirks into a dedicated function
authorJason Gerecke <killertofu@gmail.com>
Mon, 25 Jun 2018 20:24:35 +0000 (13:24 -0700)
committerJiri Kosina <jkosina@suse.cz>
Tue, 3 Jul 2018 10:07:52 +0000 (12:07 +0200)
commit578325120ec122db98b3d57e833d16c1bdac6ec6
tree90361f0498356e82d432cb9a141885a8b42ea366
parent29b9e14846f1ff201c4c1ba4fdb868dcdce6c760
HID: wacom: Move handling of HID quirks into a dedicated function

We want to keep device-specific quirks as contained as possible so that the
the code remains maintainable. Our 'wacom_setup_device_quirks' function is
the usual place for this, but some quirks need to be applied to the HID
descriptor as it is parsed. This commit introduces a new function which is
called for each usage so that any HID-specific quirks can be applied. The
function now houses quirks that were being done in 'wacom_feature_mapping'
and 'wacom_usage_mapping'.

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