summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Osterlund <petero2@telia.com>2004-04-18 01:40:07 +0200
committerPeter Osterlund <petero2@telia.com>2006-04-09 04:02:06 +0200
commit647c5ae5f5658fabb46ce434be47e2892bed2111 (patch)
tree6ff0db2653831fcd56602998fb0eace903da619b
parentf574d42c776f0687cce5c15406ea870211058b39 (diff)
Don't call ps2comm functions directly from synaptics.c.
-rw-r--r--ps2comm.c7
-rw-r--r--ps2comm.h6
-rw-r--r--synaptics.c4
3 files changed, 5 insertions, 12 deletions
diff --git a/ps2comm.c b/ps2comm.c
index ec26cec..1bf8970 100644
--- a/ps2comm.c
+++ b/ps2comm.c
@@ -241,7 +241,7 @@ synaptics_set_mode(int fd, byte mode)
/*
* reset the touchpad
*/
-Bool
+static Bool
synaptics_reset(int fd)
{
byte r[2];
@@ -382,7 +382,7 @@ synaptics_identify(int fd, struct synapticshw *synhw)
return FALSE;
}
-Bool
+static Bool
SynapticsEnableDevice(int fd)
{
return ps2_putbyte(fd, PS2_CMD_ENABLE);
@@ -460,7 +460,8 @@ PS2DeviceOnHook(LocalDevicePtr local)
static void
PS2DeviceOffHook(LocalDevicePtr local)
{
- synaptics_set_mode(local->fd, 0);
+ synaptics_reset(local->fd);
+ SynapticsEnableDevice(local->fd);
}
static Bool
diff --git a/ps2comm.h b/ps2comm.h
index d7d475a..3b6665d 100644
--- a/ps2comm.h
+++ b/ps2comm.h
@@ -50,10 +50,4 @@
typedef unsigned char byte;
-Bool
-synaptics_reset(int fd);
-
-Bool
-SynapticsEnableDevice(int fd);
-
#endif /* _PS2COMM_H_ */
diff --git a/synaptics.c b/synaptics.c
index deafc24..8bfe597 100644
--- a/synaptics.c
+++ b/synaptics.c
@@ -75,7 +75,6 @@
****************************************************************************/
#define SYNAPTICS_PRIVATE
#include "synaptics.h"
-#include "ps2comm.h"
/*****************************************************************************
* Variables without includable headers
@@ -1413,7 +1412,6 @@ QueryHardware(LocalDevicePtr local)
return FALSE;
}
xf86Msg(X_PROBED, "%s no synaptics touchpad, data piped to repeater fifo\n", local->name);
- synaptics_reset(local->fd);
- SynapticsEnableDevice(local->fd);
+ priv->proto_ops->DeviceOffHook(local);
return TRUE;
}