From 6e6cac362d9bfbb505c231f631bf9c4193029b3d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 27 Sep 2012 08:57:54 -0700 Subject: [PATCH] 3.5-stable patches added patches: input-wacom-rearrange-type-enum.patch --- .../input-wacom-rearrange-type-enum.patch | 95 +++++++++++++++++++ queue-3.5/series | 1 + 2 files changed, 96 insertions(+) create mode 100644 queue-3.5/input-wacom-rearrange-type-enum.patch diff --git a/queue-3.5/input-wacom-rearrange-type-enum.patch b/queue-3.5/input-wacom-rearrange-type-enum.patch new file mode 100644 index 00000000000..e7931167cb0 --- /dev/null +++ b/queue-3.5/input-wacom-rearrange-type-enum.patch @@ -0,0 +1,95 @@ +From ea2e60244573a9204c8cee9b4fb181106784c617 Mon Sep 17 00:00:00 2001 +From: Ping Cheng +Date: Tue, 12 Jun 2012 00:14:12 -0700 +Subject: Input: wacom - rearrange type enum + +From: Ping Cheng + +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 +Acked-by: Chris Bagwell +Reviewed-by: Jason Gerecke +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + 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 diff --git a/queue-3.5/series b/queue-3.5/series index 8745398ff96..5704fff13f3 100644 --- a/queue-3.5/series +++ b/queue-3.5/series @@ -213,3 +213,4 @@ iwlwifi-fix-flow-handler-debug-code.patch gianfar-fix-phc-index-build-failure.patch workqueue-unbound-rebind-morphing-in-rebind_workers-should-be-atomic.patch input-wacom-add-support-to-cintiq-22hd.patch +input-wacom-rearrange-type-enum.patch -- 2.47.3