diff options
author | Magnus Kessler <Magnus.Kessler@gmx.net> | 2008-10-03 17:29:40 +0930 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@redhat.com> | 2008-10-03 17:38:11 +0930 |
commit | 2e00158d61fa1c6551010fdd681b7d920eb029e5 (patch) | |
tree | 9a672474d131c5f2cac5382d1c15f3c85057bd33 /src | |
parent | 851097c45f02f2a033975cd3b2ed9490a4aa87bd (diff) |
Remove repeater functionality.
Remove the repeater functionality completely from the synaptics touchpad
driver. It is buggy in its current implementation and its usefulness is
questionable.
According to the INSTALL file, the repeater is there only for testing. In
fact, if a supported device is found even a configured repeater fifo is
automatically disabled. For most users the functionality is therefore
irrelevant and can be confusing. If I understand the workings of the
repeater correctly, a developer could instead just read the data directly
from an unsupported device's character special file under /dev
or /dev/input.
With today's more dynamic device configuration possibilities via udev and
hal it's also less likely that the synaptics driver would silently block
another devices data, this situation being for what the repeater
functionality seems to have been introduced in the past.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/synaptics.c | 49 | ||||
-rw-r--r-- | src/synapticsstr.h | 1 |
2 files changed, 0 insertions, 50 deletions
diff --git a/src/synaptics.c b/src/synaptics.c index 7b5e6d5..148b3f6 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -498,30 +498,6 @@ static void set_default_parameters(LocalDevicePtr local) } } -static void set_repeater_fifo(LocalDevicePtr local) -{ - SynapticsPrivate *priv = local->private; - pointer optList; - char *repeater; - int status; - - repeater = xf86SetStrOption(local->options, "Repeater", NULL); - if (repeater) { - /* create repeater fifo */ - status = mknod(repeater, 666, S_IFIFO); - if ((status != 0) && (status != EEXIST)) { - xf86Msg(X_ERROR, "%s can't create repeater fifo\n", local->name); - } else { - /* open the repeater fifo */ - optList = xf86NewOption("Device", repeater); - if ((priv->fifofd = xf86OpenSerial(optList)) == -1) { - xf86Msg(X_ERROR, "%s repeater device open failed\n", local->name); - } - } - free(repeater); - } -} - /* * called by the module loader for initialization */ @@ -607,9 +583,6 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags) priv->comm.buffer = XisbNew(local->fd, 200); DBG(9, XisbTrace(priv->comm.buffer, 1)); - priv->fifofd = -1; - set_repeater_fifo(local); - if (!QueryHardware(local)) { xf86Msg(X_ERROR, "%s Unable to query/initialize Synaptics hardware.\n", local->name); goto SetupProc_fail; @@ -977,18 +950,6 @@ static Bool SynapticsGetHwState(LocalDevicePtr local, SynapticsPrivate *priv, struct SynapticsHwState *hw) { - if (priv->fifofd >= 0) { - /* when there is no synaptics touchpad pipe the data to the repeater fifo */ - int count = 0; - int c; - while ((c = XisbRead(priv->comm.buffer)) >= 0) { - unsigned char u = (unsigned char)c; - write(priv->fifofd, &u, 1); - if (++count >= 3) - break; - } - return FALSE; - } return priv->proto_ops->ReadHwState(local, &priv->synhw, priv->proto_ops, &priv->comm, hw); } @@ -2225,19 +2186,9 @@ QueryHardware(LocalDevicePtr local) if (priv->proto_ops->QueryHardware(local, &priv->synhw)) { para->synhw = priv->synhw; - if (priv->fifofd != -1) { - xf86CloseSerial(priv->fifofd); - priv->fifofd = -1; - } return TRUE; } - if (priv->fifofd == -1) { - xf86Msg(X_ERROR, "%s no synaptics touchpad detected and no repeater device\n", - local->name); - return FALSE; - } - xf86Msg(X_PROBED, "%s no synaptics touchpad, data piped to repeater fifo\n", local->name); priv->proto_ops->DeviceOffHook(local); return TRUE; } diff --git a/src/synapticsstr.h b/src/synapticsstr.h index e5202d1..cc0a29f 100644 --- a/src/synapticsstr.h +++ b/src/synapticsstr.h @@ -95,7 +95,6 @@ typedef struct _SynapticsPrivateRec OsTimerPtr timer; /* for up/down-button repeat, tap processing, etc */ struct CommData comm; - int fifofd; /* fd for fifo */ SynapticsMoveHistRec move_hist[SYNAPTICS_MOVE_HISTORY]; /* movement history */ int hist_index; /* Last added entry in move_hist[] */ |