]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb6712287ae4bad99379db7380c9fdca5780f3bc5
tree2c06335a64e7806aa646459a3c409c741ab5f7dc
parente20abe887793a18eeb58f3e5cf9b8b0fd528a265
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