Commit 00abf2c6 authored by Alexandr Shadchin's avatar Alexandr Shadchin Committed by Peter Hutterer

Remove arg proto_ops in ReadHwState()

Signed-off-by: default avatarAlexandr Shadchin <Alexandr.Shadchin@gmail.com>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 8e6d6724
......@@ -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;
......
......@@ -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;
......
......@@ -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)
{
......@@ -653,6 +653,13 @@ PS2ReadHwState(InputInfoPtr pInfo,
return TRUE;
}
static Bool
PS2ReadHwState(InputInfoPtr pInfo,
struct CommData *comm, struct SynapticsHwState *hwRet)
{
return PS2ReadHwStateProto(pInfo, &psaux_proto_operations, comm, hwRet);
}
static Bool
PS2AutoDevProbe(InputInfoPtr pInfo)
{
......
......@@ -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_ */
......@@ -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)
......
......@@ -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);
}
/*
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment