summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-11-30 09:59:37 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-12-14 07:57:58 +1000
commit3356dcb8f20cbcff4c08ba6a856a6c8d41f659d7 (patch)
tree1f5f94917114a0e43a8fb3d4a14ef7c06b7d3edc /src
parentdf427ef5cc45c33a4159b7852cd40da6f7cc4b94 (diff)
If protocol is auto-dev and the device path is set, unset the protocol
The remainder of the handling code will take try through all protocols, taking the device into account (as of xf86-input-synaptics-1.4.0-34-g241254e) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit 0cd5a77c3a455e942929eb4d5412fa51630ed13f)
Diffstat (limited to 'src')
-rw-r--r--src/synaptics.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index d036bdf..a8e9063 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -258,6 +258,13 @@ SetDeviceAndProtocol(InputInfoPtr pInfo)
proto = xf86SetStrOption(pInfo->options, "Protocol", NULL);
device = xf86SetStrOption(pInfo->options, "Device", NULL);
+
+ /* If proto is auto-dev, unset and let the code do the rest */
+ if (proto && !strcmp(proto, "auto-dev")) {
+ free(proto);
+ proto = NULL;
+ }
+
for (i = 0; protocols[i].name; i++) {
if ((!device || !proto) &&
protocols[i].proto_ops->AutoDevProbe &&