Commit ea2e6024 authored by Ping Cheng's avatar Ping Cheng Committed by Dmitry Torokhov

Input: wacom - rearrange type enum

So we can simplify a few type related if statements
Signed-off-by: default avatarPing Cheng <pingc@wacom.com>
Acked-by: default avatarChris Bagwell <chris@cnpbagwell.com>
Reviewed-by: default avatarJason Gerecke <killertofu@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 03ecd229
...@@ -440,8 +440,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat ...@@ -440,8 +440,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
/* ask to report Wacom data */ /* ask to report Wacom data */
if (features->device_type == BTN_TOOL_FINGER) { if (features->device_type == BTN_TOOL_FINGER) {
/* if it is an MT Tablet PC touch */ /* if it is an MT Tablet PC touch */
if (features->type == TABLETPC2FG || if (features->type > TABLETPC) {
features->type == MTSCREEN) {
do { do {
rep_data[0] = 3; rep_data[0] = 3;
rep_data[1] = 4; rep_data[1] = 4;
...@@ -460,7 +459,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat ...@@ -460,7 +459,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
} while ((error < 0 || rep_data[1] != 4) && } while ((error < 0 || rep_data[1] != 4) &&
limit++ < WAC_MSG_RETRIES); limit++ < WAC_MSG_RETRIES);
} }
} else if (features->type != TABLETPC && } else if (features->type <= BAMBOO_PT &&
features->type != WIRELESS && features->type != WIRELESS &&
features->device_type == BTN_TOOL_PEN) { features->device_type == BTN_TOOL_PEN) {
do { do {
...@@ -510,10 +509,7 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf, ...@@ -510,10 +509,7 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
} }
/* only devices that support touch need to retrieve the info */ /* only devices that support touch need to retrieve the info */
if (features->type != TABLETPC && if (features->type < BAMBOO_PT) {
features->type != TABLETPC2FG &&
features->type != BAMBOO_PT &&
features->type != MTSCREEN) {
goto out; goto out;
} }
......
...@@ -1317,10 +1317,8 @@ void wacom_setup_device_quirks(struct wacom_features *features) ...@@ -1317,10 +1317,8 @@ void wacom_setup_device_quirks(struct wacom_features *features)
} }
/* these device have multiple inputs */ /* these device have multiple inputs */
if (features->type == TABLETPC || features->type == TABLETPC2FG || if (features->type >= WIRELESS ||
features->type == BAMBOO_PT || features->type == WIRELESS || (features->type >= INTUOS5S && features->type <= INTUOS5L))
(features->type >= INTUOS5S && features->type <= INTUOS5L) ||
features->type == MTSCREEN)
features->quirks |= WACOM_QUIRK_MULTI_INPUT; features->quirks |= WACOM_QUIRK_MULTI_INPUT;
/* quirk for bamboo touch with 2 low res touches */ /* quirk for bamboo touch with 2 low res touches */
......
...@@ -62,8 +62,6 @@ enum { ...@@ -62,8 +62,6 @@ enum {
PTU, PTU,
PL, PL,
DTU, DTU,
BAMBOO_PT,
WIRELESS,
INTUOS, INTUOS,
INTUOS3S, INTUOS3S,
INTUOS3, INTUOS3,
...@@ -79,7 +77,9 @@ enum { ...@@ -79,7 +77,9 @@ enum {
CINTIQ, CINTIQ,
WACOM_BEE, WACOM_BEE,
WACOM_MO, WACOM_MO,
TABLETPC, WIRELESS,
BAMBOO_PT,
TABLETPC, /* add new TPC below */
TABLETPC2FG, TABLETPC2FG,
MTSCREEN, MTSCREEN,
MAX_TYPE MAX_TYPE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment