[patch] Input: wacom - fix a check for WACOM_24HDT

Subsystems: input (keyboard, mouse, joystick, touchscreen) drivers, the rest

STALE5046d

2 messages, 2 authors, 2012-10-31 · open the first message on its own page

[patch] Input: wacom - fix a check for WACOM_24HDT

From: Dan Carpenter <hidden>
Date: 2012-10-29 08:50:14

The current condition is always true.  From the context, it looks like
we should be checking if ->type == WACOM_24HDT.

Signed-off-by: Dan Carpenter <redacted>
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 2c1e12b..858ad44 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -391,7 +391,7 @@ static int wacom_parse_hid(struct usb_interface *intf,
 							features->pktlen = WACOM_PKGLEN_TPC2FG;
 						}
 
-						if (features->type == MTSCREEN || WACOM_24HDT)
+						if (features->type == MTSCREEN || features->type == WACOM_24HDT)
 							features->pktlen = WACOM_PKGLEN_MTOUCH;
 
 						if (features->type == BAMBOO_PT) {

Re: [patch] Input: wacom - fix a check for WACOM_24HDT

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2012-10-31 05:57:22

On Mon, Oct 29, 2012 at 11:49:56AM +0300, Dan Carpenter wrote:
The current condition is always true.  From the context, it looks like
we should be checking if ->type == WACOM_24HDT.

Signed-off-by: Dan Carpenter <redacted>
Thank you Dan, however I already have a patch from Jason Gerecke
addressing this issue.
quoted hunk
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 2c1e12b..858ad44 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -391,7 +391,7 @@ static int wacom_parse_hid(struct usb_interface *intf,
 							features->pktlen = WACOM_PKGLEN_TPC2FG;
 						}
 
-						if (features->type == MTSCREEN || WACOM_24HDT)
+						if (features->type == MTSCREEN || features->type == WACOM_24HDT)
 							features->pktlen = WACOM_PKGLEN_MTOUCH;
 
 						if (features->type == BAMBOO_PT) {
-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help