Skip to contentSkip to conversation

input : wacom - Simplify type check for newer V5 devices

PATCH In review Ping Cheng 2 participants 2 messages Nov 21, 2012

Subsystems (2)
lore
Share & tools
lore

Ping Cheng

author
#0 lore raw

PATCH 1/2 input : wacom - Simplify type check for newer V5 devices

The updated type enum enables this implementation.

---
 drivers/input/tablet/wacom_wac.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/input/tablet/wacom_wac.c +1 -3
index 7554a04..f09f39e 100644
@@ -467,9 +467,7 @@ static void wacom_intuos_general(struct wacom_wac *wacom)
 	/* general pen packet */
 	if ((data[1] & 0xb8) == 0xa0) {
 		t = (data[6] << 2) | ((data[7] >> 6) & 3);
-		if ((features->type >= INTUOS4S && features->type <= INTUOS4L) ||
-                    (features->type >= INTUOS5S && features->type <= INTUOS5L) ||
-		    (features->type >= WACOM_21UX2 && features->type <= WACOM_24HD)) {
+		if ((features->type >= INTUOS4S && features->type <= WACOM_24HD)) {
 			t = (t << 1) | (data[1] & 1);
 		}
 		input_report_abs(input, ABS_PRESSURE, t);
Signature · 1 line
1.7.10.4
maintainer
#1 lore raw
Quoted 12 lines · Ping Cheng

The updated type enum enables this implementation.

---
 drivers/input/tablet/wacom_wac.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/input/tablet/wacom_wac.c +0 -0
index 7554a04..f09f39e 100644

drivers/input/tablet/wacom_wac.c static void wacom_intuos_general(struct wacom_wac *wacom) · line 470

Quoted 7 lines
drivers/input/tablet/wacom_wac.c +1 -3
@@ -467,9 +467,7 @@ static void wacom_intuos_general(struct wacom_wac *wacom)
 	/* general pen packet */
 	if ((data[1] & 0xb8) == 0xa0) {
 		t = (data[6] << 2) | ((data[7] >> 6) & 3);
-		if ((features->type >= INTUOS4S && features->type <= INTUOS4L) ||
-                    (features->type >= INTUOS5S && features->type <= INTUOS5L) ||
-		    (features->type >= WACOM_21UX2 && features->type <= WACOM_24HD)) {
+		if ((features->type >= INTUOS4S && features->type <= WACOM_24HD)) {

This has extra parenthesis.

Anyway, applied both, thanks Ping.

Signature · 1 line
Dmitry