summaryrefslogtreecommitdiff
path: root/drivers/input/tablet/wacom_sys.c
diff options
context:
space:
mode:
authorPing Cheng <pinglinux@gmail.com>2012-06-12 00:14:12 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-06-12 00:39:51 -0700
commitea2e60244573a9204c8cee9b4fb181106784c617 (patch)
treea33b1950a62d095d9806f74da7a87ba2e7a564b7 /drivers/input/tablet/wacom_sys.c
parent03ecd229a5d05a5c62e7262d66ec6cd57d5eca6c (diff)
Input: wacom - rearrange type enum
So we can simplify a few type related if statements Signed-off-by: Ping Cheng <pingc@wacom.com> Acked-by: Chris Bagwell <chris@cnpbagwell.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/tablet/wacom_sys.c')
-rw-r--r--drivers/input/tablet/wacom_sys.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index b3a8bd3514b2..79b5cfbc1bc4 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -440,8 +440,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
/* ask to report Wacom data */
if (features->device_type == BTN_TOOL_FINGER) {
/* if it is an MT Tablet PC touch */
- if (features->type == TABLETPC2FG ||
- features->type == MTSCREEN) {
+ if (features->type > TABLETPC) {
do {
rep_data[0] = 3;
rep_data[1] = 4;
@@ -460,7 +459,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
} while ((error < 0 || rep_data[1] != 4) &&
limit++ < WAC_MSG_RETRIES);
}
- } else if (features->type != TABLETPC &&
+ } else if (features->type <= BAMBOO_PT &&
features->type != WIRELESS &&
features->device_type == BTN_TOOL_PEN) {
do {
@@ -510,10 +509,7 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
}
/* only devices that support touch need to retrieve the info */
- if (features->type != TABLETPC &&
- features->type != TABLETPC2FG &&
- features->type != BAMBOO_PT &&
- features->type != MTSCREEN) {
+ if (features->type < BAMBOO_PT) {
goto out;
}