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)
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

Simple merge