summaryrefslogtreecommitdiff
path: root/src/psmcomm.c
diff options
context:
space:
mode:
authorColeman Kane <ckane@colemankane.org>2009-05-18 18:14:50 -0400
committerPeter Hutterer <peter.hutterer@who-t.net>2009-05-19 08:25:43 +1000
commita9f8b19ceba8f7652ebdb620fb0785dfa578a218 (patch)
tree8dc0d08f85d40f9d625f865fae6c053889942c3d /src/psmcomm.c
parent35191ec094a2006ba290713640dd95c88ca3b0f9 (diff)
Fix broken build on FreeBSD (#21803)
Band-aid to fix the build and function prototype mismatches on FreeBSD (and maybe others, but I don't have any more to test). Signed-off-by: Coleman Kane <ckane@colemankane.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/psmcomm.c')
-rw-r--r--src/psmcomm.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/psmcomm.c b/src/psmcomm.c
index e7d2a92..f5c2b0c 100644
--- a/src/psmcomm.c
+++ b/src/psmcomm.c
@@ -50,6 +50,14 @@
#define SYSCALL(call) while (((call) == -1) && (errno == EINTR))
+struct SynapticsHwInfo {
+ unsigned int model_id; /* Model-ID */
+ unsigned int capabilities; /* Capabilities */
+ unsigned int ext_cap; /* Extended Capabilities */
+ unsigned int identity; /* Identification */
+ Bool hasGuest; /* Has a guest mouse */
+};
+
/*
* Identify Touchpad
* See also the SYN_ID_* macros
@@ -125,9 +133,17 @@ convert_hw_info(const synapticshw_t *psm_ident, struct SynapticsHwInfo *synhw)
}
static Bool
-PSMQueryHardware(LocalDevicePtr local, struct SynapticsHwInfo *synhw)
+PSMQueryHardware(LocalDevicePtr local)
{
synapticshw_t psm_ident;
+ struct SynapticsHwInfo *synhw;
+ SynapticsPrivate *priv;
+
+ priv = (SynapticsPrivate *)local->private;
+
+ if(!priv->proto_data)
+ priv->proto_data = xcalloc(1, sizeof(struct SynapticsHwInfo));
+ synhw = (struct SynapticsHwInfo*)priv->proto_data;
/* is the synaptics touchpad active? */
if (!PSMQueryIsSynaptics(local))
@@ -152,11 +168,11 @@ PSMQueryHardware(LocalDevicePtr local, struct SynapticsHwInfo *synhw)
}
static Bool
-PSMReadHwState(LocalDevicePtr local, struct SynapticsHwInfo *synhw,
+PSMReadHwState(LocalDevicePtr local,
struct SynapticsProtocolOperations *proto_ops,
struct CommData *comm, struct SynapticsHwState *hwRet)
{
- return psaux_proto_operations.ReadHwState(local, synhw, proto_ops, comm, hwRet);
+ return psaux_proto_operations.ReadHwState(local, proto_ops, comm, hwRet);
}
static Bool PSMAutoDevProbe(LocalDevicePtr local)