From 0cd5a77c3a455e942929eb4d5412fa51630ed13f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 30 Nov 2011 09:59:37 +1000 Subject: 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 Reviewed-by: Jeremy Huddleston --- src/synaptics.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/synaptics.c') 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 && -- cgit v1.2.3