summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-01-18 16:44:28 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-01-18 16:44:28 +1000
commit999cbc8933c6b01d5045afed8203aeba7dfdcb6f (patch)
tree0e3dd991312bb4e31f40d8fea1468d00359cad61 /src
parent556aac04b5d56f015d5da8b96e24fd78ad231760 (diff)
touchpad: drop the model detection - write-only value
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/evdev-mt-touchpad.c36
-rw-r--r--src/evdev-mt-touchpad.h1
2 files changed, 0 insertions, 37 deletions
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index f91f8392..6f834fb1 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -2094,40 +2094,6 @@ tp_change_to_left_handed(struct evdev_device *device)
device->left_handed.enabled = device->left_handed.want_enabled;
}
-struct model_lookup_t {
- uint16_t vendor;
- uint16_t product_start;
- uint16_t product_end;
- enum touchpad_model model;
-};
-
-static struct model_lookup_t model_lookup_table[] = {
- { 0x0002, 0x0007, 0x0007, MODEL_SYNAPTICS },
- { 0x0002, 0x0008, 0x0008, MODEL_ALPS },
- { 0x0002, 0x000e, 0x000e, MODEL_ELANTECH },
- { 0x05ac, 0, 0x0222, MODEL_APPLETOUCH },
- { 0x05ac, 0x0223, 0x0228, MODEL_UNIBODY_MACBOOK },
- { 0x05ac, 0x0229, 0x022b, MODEL_APPLETOUCH },
- { 0x05ac, 0x022c, 0xffff, MODEL_UNIBODY_MACBOOK },
- { 0, 0, 0, 0 }
-};
-
-static enum touchpad_model
-tp_get_model(struct evdev_device *device)
-{
- struct model_lookup_t *lookup;
- uint16_t vendor = libevdev_get_id_vendor(device->evdev);
- uint16_t product = libevdev_get_id_product(device->evdev);
-
- for (lookup = model_lookup_table; lookup->vendor; lookup++) {
- if (lookup->vendor == vendor &&
- lookup->product_start <= product &&
- product <= lookup->product_end)
- return lookup->model;
- }
- return MODEL_UNKNOWN;
-}
-
struct evdev_dispatch *
evdev_mt_touchpad_create(struct evdev_device *device)
{
@@ -2137,8 +2103,6 @@ evdev_mt_touchpad_create(struct evdev_device *device)
if (!tp)
return NULL;
- tp->model = tp_get_model(device);
-
if (tp_init(tp, device) != 0) {
tp_interface_destroy(&tp->base);
return NULL;
diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h
index b5e0e8ec..eb6702d3 100644
--- a/src/evdev-mt-touchpad.h
+++ b/src/evdev-mt-touchpad.h
@@ -227,7 +227,6 @@ struct tp_dispatch {
bool has_mt;
bool semi_mt;
bool reports_distance; /* does the device support true hovering */
- enum touchpad_model model;
unsigned int num_slots; /* number of slots */
unsigned int ntouches; /* no slots inc. fakes */