diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-11-30 09:59:37 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-01 07:36:27 +1000 |
commit | 0cd5a77c3a455e942929eb4d5412fa51630ed13f (patch) | |
tree | ef5ae77b9390a37bc47d0d3110919057f355fc9e /src/synaptics.c | |
parent | d1301412d7b7acd6325f0561c109f2b8e1c7a999 (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>
Diffstat (limited to 'src/synaptics.c')
-rw-r--r-- | 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 && |