[PATCH synaptics] If protocol is auto-dev and the device path is set, unset the protocol

Peter Hutterer peter.hutterer at who-t.net
Tue Nov 29 16:03:48 PST 2011


The remainder of the code take try through all protocols, taking the device
into account (as of xf86-input-synaptics-1.4.0-34-g241254e)

Reported-by: Martin Bruse <zondolfin at gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/synaptics.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/synaptics.c b/src/synaptics.c
index 8fbddc8..9490106 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -274,6 +274,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 &&
-- 
1.7.7.1



More information about the xorg-devel mailing list