diff options
author | Kyle McMartin <kyle@mcmartin.ca> | 2010-10-26 13:05:04 -0400 |
---|---|---|
committer | Kyle McMartin <kyle@mcmartin.ca> | 2010-10-26 13:05:04 -0400 |
commit | 3daa57b3d93c5d0a795e3446850c83483df37f2e (patch) | |
tree | b7180846ac827be0456498f39eb2adf67c18ec39 /wacom-03-collect-device-quirks-into-single-function.patch | |
parent | c22cea221f8de78ab36ce0f183b73c99031cc7dc (diff) | |
download | kernel-3daa57b3d93c5d0a795e3446850c83483df37f2e.tar.gz kernel-3daa57b3d93c5d0a795e3446850c83483df37f2e.tar.xz kernel-3daa57b3d93c5d0a795e3446850c83483df37f2e.zip |
Linux 2.6.36-git8
Diffstat (limited to 'wacom-03-collect-device-quirks-into-single-function.patch')
-rw-r--r-- | wacom-03-collect-device-quirks-into-single-function.patch | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/wacom-03-collect-device-quirks-into-single-function.patch b/wacom-03-collect-device-quirks-into-single-function.patch deleted file mode 100644 index 7bf768770..000000000 --- a/wacom-03-collect-device-quirks-into-single-function.patch +++ /dev/null @@ -1,107 +0,0 @@ -From: Henrik Rydberg <rydberg@euromail.se> -Date: Sun, 5 Sep 2010 19:26:16 +0000 (-0700) -Subject: Input: wacom - collect device quirks into single function -X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdtor%2Finput.git;a=commitdiff_plain;h=bc73dd39e78dd6e5b34cd938b7f037a8bc041bdd - -Input: wacom - collect device quirks into single function - -Collect device-specific code into a single function, and use quirks to -flag specific behavior instead. - -Signed-off-by: Henrik Rydberg <rydberg@euromail.se> -Acked-by: Ping Cheng <pingc@wacom.com> -Signed-off-by: Dmitry Torokhov <dtor@mail.ru> ---- - -diff --git a/drivers/input/tablet/wacom.h b/drivers/input/tablet/wacom.h -index 284dfaa..de5adb1 100644 ---- a/drivers/input/tablet/wacom.h -+++ b/drivers/input/tablet/wacom.h -@@ -118,6 +118,7 @@ struct wacom { - extern const struct usb_device_id wacom_ids[]; - - void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len); -+void wacom_setup_device_quirks(struct wacom_features *features); - void wacom_setup_input_capabilities(struct input_dev *input_dev, - struct wacom_wac *wacom_wac); - #endif -diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c -index 98cba08..fc6fd53 100644 ---- a/drivers/input/tablet/wacom_sys.c -+++ b/drivers/input/tablet/wacom_sys.c -@@ -381,12 +381,6 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf, - if (error) - goto out; - -- /* touch device found but size is not defined. use default */ -- if (features->device_type == BTN_TOOL_DOUBLETAP && !features->x_max) { -- features->x_max = 1023; -- features->y_max = 1023; -- } -- - out: - return error; - } -@@ -522,10 +516,11 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i - if (error) - goto fail2; - -+ wacom_setup_device_quirks(features); -+ - strlcpy(wacom_wac->name, features->name, sizeof(wacom_wac->name)); - -- if (features->type == TABLETPC || features->type == TABLETPC2FG || -- features->type == BAMBOO_PT) { -+ if (features->quirks & WACOM_QUIRK_MULTI_INPUT) { - /* Append the device type to the name */ - strlcat(wacom_wac->name, - features->device_type == BTN_TOOL_PEN ? -diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c -index 6d7e164..44b4a59 100644 ---- a/drivers/input/tablet/wacom_wac.c -+++ b/drivers/input/tablet/wacom_wac.c -@@ -941,6 +941,22 @@ static void wacom_setup_intuos(struct wacom_wac *wacom_wac) - input_set_abs_params(input_dev, ABS_THROTTLE, -1023, 1023, 0, 0); - } - -+ -+void wacom_setup_device_quirks(struct wacom_features *features) -+{ -+ -+ /* touch device found but size is not defined. use default */ -+ if (features->device_type == BTN_TOOL_DOUBLETAP && !features->x_max) { -+ features->x_max = 1023; -+ features->y_max = 1023; -+ } -+ -+ /* these device have multiple inputs */ -+ if (features->type == TABLETPC || features->type == TABLETPC2FG || -+ features->type == BAMBOO_PT) -+ features->quirks |= WACOM_QUIRK_MULTI_INPUT; -+} -+ - void wacom_setup_input_capabilities(struct input_dev *input_dev, - struct wacom_wac *wacom_wac) - { -diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h -index fb30895..6a1ff10 100644 ---- a/drivers/input/tablet/wacom_wac.h -+++ b/drivers/input/tablet/wacom_wac.h -@@ -38,6 +38,9 @@ - #define WACOM_REPORT_TPC1FG 6 - #define WACOM_REPORT_TPC2FG 13 - -+/* device quirks */ -+#define WACOM_QUIRK_MULTI_INPUT 0x0001 -+ - enum { - PENPARTNER = 0, - GRAPHIRE, -@@ -79,6 +82,7 @@ struct wacom_features { - int y_fuzz; - int pressure_fuzz; - int distance_fuzz; -+ unsigned quirks; - }; - - struct wacom_shared { |