HID: wacom: set stylus_in_proximity before checking touch_down
authorPing Cheng <pinglinux@gmail.com>
Fri, 20 Mar 2015 21:58:01 +0000 (14:58 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 2 Apr 2015 12:15:05 +0000 (14:15 +0200)
commit0149931e6d2fa995fbcee590bb6cf9007a8839fc
tree60c0d5783f3ff85958edf3f3394209d55a8ed61f
parent7d059ed01ca18d20e0a94ef785ee81a45c19d78c
HID: wacom: set stylus_in_proximity before checking touch_down

In wacom_bpt_pen, we checked touch_down before assigning new
stylus_in_proximity value. This would cause stylus_in_proximity not updated
properly if touch is down before pen is in proximity.

[jkosina@suse.cz: fix if-else style]
Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_wac.c