Skip to contentSkip to conversation

Input: wacom - Fix wacom->shared guards for dual input devices

PATCH Applied Ping Cheng 2 participants 2 messages Jan 15, 2014 – Jan 17, 2014

Subsystems (2)
lore
Share & tools
lore

Ping Cheng

author
#0 lore raw

PATCH 1/1 Input: wacom - Fix wacom->shared guards for dual input devices

features->quirks can have multiple bits set. For dual input, we only need to check WACOM_QUIRK_MULTI_INPUT.

---
 drivers/input/tablet/wacom_wac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/input/tablet/wacom_wac.c +2 -2
index 048e5b3..0bcc7a6 100644
@@ -331,7 +331,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
 
 	/* Enter report */
 	if ((data[1] & 0xfc) == 0xc0) {
-		if (features->quirks == WACOM_QUIRK_MULTI_INPUT)
+		if (features->quirks & WACOM_QUIRK_MULTI_INPUT)
 			wacom->shared->stylus_in_proximity = true;
 
 		/* serial number of the tool */
@@ -436,7 +436,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
 
 	/* Exit report */
 	if ((data[1] & 0xfe) == 0x80) {
-		if (features->quirks == WACOM_QUIRK_MULTI_INPUT)
+		if (features->quirks & WACOM_QUIRK_MULTI_INPUT)
 			wacom->shared->stylus_in_proximity = false;
 
 		/*
Signature · 1 line
1.8.3.2
maintainer Applied
#1 lore raw
Quoted 5 lines · Ping Cheng

features->quirks can have multiple bits set. For dual input, we only need to check WACOM_QUIRK_MULTI_INPUT.

Applied, thank you.

Quoted 29 lines
---
 drivers/input/tablet/wacom_wac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/input/tablet/wacom_wac.c +2 -2
index 048e5b3..0bcc7a6 100644
@@ -331,7 +331,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
 
 	/* Enter report */
 	if ((data[1] & 0xfc) == 0xc0) {
-		if (features->quirks == WACOM_QUIRK_MULTI_INPUT)
+		if (features->quirks & WACOM_QUIRK_MULTI_INPUT)
 			wacom->shared->stylus_in_proximity = true;
 
 		/* serial number of the tool */
@@ -436,7 +436,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
 
 	/* Exit report */
 	if ((data[1] & 0xfe) == 0x80) {
-		if (features->quirks == WACOM_QUIRK_MULTI_INPUT)
+		if (features->quirks & WACOM_QUIRK_MULTI_INPUT)
 			wacom->shared->stylus_in_proximity = false;
 
 		/*
Signature · 1 line
1.8.3.2
Signature · 1 line
Dmitry