aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2015-11-16 18:24:14 -0500
committerJiri Kosina <jkosina@suse.cz>2015-11-16 18:24:14 -0500
commita3088abc68f79ac30e6e8ccb07a15c8093e39684 (patch)
treed0d8c0bfaf060b2c5b34792e8df5abe3303b5a90
parentff38e82931aeaa339d6bf4a9980e011cbfd14927 (diff)
HID: wacom: fixup quirks setup for WACOM_DEVICETYPE_PAD
Given that INTUOSHT < BAMBOO_PT features->type >= INTUOSHT || features->type <= BAMBOO_PT condition is always true, and therefore device_type is under certain circumstances wrongly set with WACOM_DEVICETYPE_PAD bit set. Fix the condition so that it actually represents the range as intended. Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/hid/wacom_wac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 0ff22dbe334c..01a4f05c1642 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -2481,7 +2481,7 @@ void wacom_setup_device_quirks(struct wacom *wacom)
2481 if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) { 2481 if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) {
2482 if (features->touch_max) 2482 if (features->touch_max)
2483 features->device_type |= WACOM_DEVICETYPE_TOUCH; 2483 features->device_type |= WACOM_DEVICETYPE_TOUCH;
2484 if (features->type >= INTUOSHT || features->type <= BAMBOO_PT) 2484 if (features->type >= INTUOSHT && features->type <= BAMBOO_PT)
2485 features->device_type |= WACOM_DEVICETYPE_PAD; 2485 features->device_type |= WACOM_DEVICETYPE_PAD;
2486 2486
2487 features->x_max = 4096; 2487 features->x_max = 4096;