[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120928183023.633398304@linuxfoundation.org>
Date: Fri, 28 Sep 2012 11:52:25 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Greg KH <gregkh@...uxfoundation.org>, alan@...rguk.ukuu.org.uk,
Ping Cheng <pingc@...om.com>,
Chris Bagwell <chris@...bagwell.com>,
Jason Gerecke <killertofu@...il.com>,
Dmitry Torokhov <dtor@...l.ru>
Subject: [ 216/262] Input: wacom - rearrange type enum
From: Greg KH <gregkh@...uxfoundation.org>
3.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ping Cheng <pinglinux@...il.com>
commit ea2e60244573a9204c8cee9b4fb181106784c617 upstream.
So we can simplify a few type related if statements
Also fixes https://bugzilla.kernel.org/show_bug.cgi?id=46821
Signed-off-by: Ping Cheng <pingc@...om.com>
Acked-by: Chris Bagwell <chris@...bagwell.com>
Reviewed-by: Jason Gerecke <killertofu@...il.com>
Signed-off-by: Dmitry Torokhov <dtor@...l.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/input/tablet/wacom_sys.c | 10 +++-------
drivers/input/tablet/wacom_wac.c | 6 ++----
drivers/input/tablet/wacom_wac.h | 6 +++---
3 files changed, 8 insertions(+), 14 deletions(-)
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -445,8 +445,7 @@ static int wacom_query_tablet_data(struc
/* 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;
@@ -465,7 +464,7 @@ static int wacom_query_tablet_data(struc
} 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 {
@@ -515,10 +514,7 @@ static int wacom_retrieve_hid_descriptor
}
/* 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;
}
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -1324,10 +1324,8 @@ void wacom_setup_device_quirks(struct wa
}
/* these device have multiple inputs */
- if (features->type == TABLETPC || features->type == TABLETPC2FG ||
- features->type == BAMBOO_PT || features->type == WIRELESS ||
- (features->type >= INTUOS5S && features->type <= INTUOS5L) ||
- features->type == MTSCREEN)
+ if (features->type >= WIRELESS ||
+ (features->type >= INTUOS5S && features->type <= INTUOS5L))
features->quirks |= WACOM_QUIRK_MULTI_INPUT;
/* quirk for bamboo touch with 2 low res touches */
--- a/drivers/input/tablet/wacom_wac.h
+++ b/drivers/input/tablet/wacom_wac.h
@@ -62,8 +62,6 @@ enum {
PTU,
PL,
DTU,
- BAMBOO_PT,
- WIRELESS,
INTUOS,
INTUOS3S,
INTUOS3,
@@ -80,7 +78,9 @@ enum {
CINTIQ,
WACOM_BEE,
WACOM_MO,
- TABLETPC,
+ WIRELESS,
+ BAMBOO_PT,
+ TABLETPC, /* add new TPC below */
TABLETPC2FG,
MTSCREEN,
MAX_TYPE
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists