Signed-off-by: Alexandr Shadchin <alexandr.shadc...@gmail.com> --- Changes to v2: - Rename PS2ReadHwStatePriv in PS2ReadHwStateProto
src/alpscomm.c | 3 +-- src/eventcomm.c | 1 - src/ps2comm.c | 13 ++++++++++--- src/ps2comm.h | 3 +++ src/psmcomm.c | 3 +-- src/synaptics.c | 3 +-- src/synproto.h | 1 - 7 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/alpscomm.c b/src/alpscomm.c index 56f74ac..3872f5c 100644 --- a/src/alpscomm.c +++ b/src/alpscomm.c @@ -33,10 +33,10 @@ #endif #include <xorg-server.h> -#include "ps2comm.h" #include "synproto.h" #include "synaptics.h" #include "synapticsstr.h" +#include "ps2comm.h" #include <xf86.h> @@ -206,7 +206,6 @@ ALPS_process_packet(unsigned char *packet, struct SynapticsHwState *hw) static Bool ALPSReadHwState(InputInfoPtr pInfo, - struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet) { unsigned char *buf = comm->protoBuf; diff --git a/src/eventcomm.c b/src/eventcomm.c index 1a31c54..d394d3f 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -316,7 +316,6 @@ SynapticsReadEvent(InputInfoPtr pInfo, struct input_event *ev) static Bool EventReadHwState(InputInfoPtr pInfo, - struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet) { struct input_event ev; diff --git a/src/ps2comm.c b/src/ps2comm.c index 6991d22..a6e052c 100644 --- a/src/ps2comm.c +++ b/src/ps2comm.c @@ -37,10 +37,10 @@ #endif #include <xorg-server.h> -#include "ps2comm.h" #include "synproto.h" #include "synaptics.h" #include "synapticsstr.h" +#include "ps2comm.h" #include <xf86.h> #define MAX_UNSYNC_PACKETS 10 /* i.e. 10 to 60 bytes */ @@ -513,8 +513,8 @@ ps2_synaptics_get_packet(InputInfoPtr pInfo, struct PS2SynapticsHwInfo *synhw, return FALSE; } -static Bool -PS2ReadHwState(InputInfoPtr pInfo, +Bool +PS2ReadHwStateProto(InputInfoPtr pInfo, struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet) { @@ -654,6 +654,13 @@ PS2ReadHwState(InputInfoPtr pInfo, } static Bool +PS2ReadHwState(InputInfoPtr pInfo, + struct CommData *comm, struct SynapticsHwState *hwRet) +{ + return PS2ReadHwStateProto(pInfo, &psaux_proto_operations, comm, hwRet); +} + +static Bool PS2AutoDevProbe(InputInfoPtr pInfo) { return FALSE; diff --git a/src/ps2comm.h b/src/ps2comm.h index 2cf6a23..006cc3f 100644 --- a/src/ps2comm.h +++ b/src/ps2comm.h @@ -103,5 +103,8 @@ struct PS2SynapticsHwInfo { Bool ps2_putbyte(int fd, byte b); void ps2_print_ident(const struct PS2SynapticsHwInfo *synhw); +Bool PS2ReadHwStateProto(InputInfoPtr pInfo, + struct SynapticsProtocolOperations *proto_ops, + struct CommData *comm, struct SynapticsHwState *hwRet); #endif /* _PS2COMM_H_ */ diff --git a/src/psmcomm.c b/src/psmcomm.c index 596db48..eec240c 100644 --- a/src/psmcomm.c +++ b/src/psmcomm.c @@ -157,10 +157,9 @@ PSMQueryHardware(InputInfoPtr pInfo) static Bool PSMReadHwState(InputInfoPtr pInfo, - struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet) { - return psaux_proto_operations.ReadHwState(pInfo, proto_ops, comm, hwRet); + return PS2ReadHwStateProto(pInfo, &psm_proto_operations, comm, hwRet); } static Bool PSMAutoDevProbe(InputInfoPtr pInfo) diff --git a/src/synaptics.c b/src/synaptics.c index 0b1681a..9980dcc 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -1254,8 +1254,7 @@ static Bool SynapticsGetHwState(InputInfoPtr pInfo, SynapticsPrivate *priv, struct SynapticsHwState *hw) { - return priv->proto_ops->ReadHwState(pInfo, priv->proto_ops, - &priv->comm, hw); + return priv->proto_ops->ReadHwState(pInfo, &priv->comm, hw); } /* diff --git a/src/synproto.h b/src/synproto.h index a899a73..3fe70b9 100644 --- a/src/synproto.h +++ b/src/synproto.h @@ -86,7 +86,6 @@ struct SynapticsProtocolOperations { void (*DeviceOffHook)(InputInfoPtr pInfo); Bool (*QueryHardware)(InputInfoPtr pInfo); Bool (*ReadHwState)(InputInfoPtr pInfo, - struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet); Bool (*AutoDevProbe)(InputInfoPtr pInfo); void (*ReadDevDimensions)(InputInfoPtr pInfo); -- 1.7.3.5 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel