OSDN Git Service

HID: wacom: Report correct device resolution when using the wireless adapater
authorJason Gerecke <killertofu@gmail.com>
Wed, 5 Aug 2015 22:44:53 +0000 (15:44 -0700)
committerJiri Kosina <jkosina@suse.cz>
Mon, 10 Aug 2015 21:49:56 +0000 (23:49 +0200)
commit0be017120b80f0fe3da9a8239f989a27e54828f2
tree2c06335a64e7806aa646459a3c409c741ab5f7dc
parent0621809e37936e7c2b3eac9165cf2aad7f9189eb
HID: wacom: Report correct device resolution when using the wireless adapater

The 'wacom_wireless_work' function does not recalculate the tablet's
resolution, causing the value contained in the 'features' struct to
always be reported to userspace. This value is valid only for the pen
interface, meaning that the value will be incorrect for the touchpad (if
present). This in particular causes problems for libinput which relies
on the reported resolution being correct.

This patch adds the necessary calls to recalculate the resolution for
each interface. This requires a little bit of code shuffling since both
the 'wacom_set_default_phy' and 'wacom_calculate_res' are declared below
their new first point of use in 'wacom_wireless_work'.

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