Commit efbc3e98 authored by Peter Hutterer's avatar Peter Hutterer

Remove un-used DeviceOn/Off hooks.

And allow for them to be NULL without crashing the server.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent c09a3d50
......@@ -86,16 +86,6 @@ ALPS_initialize(int fd)
ALPS_sync(fd);
}
static void
ALPSDeviceOnHook(LocalDevicePtr local, SynapticsParameters *para)
{
}
static void
ALPSDeviceOffHook(LocalDevicePtr local)
{
}
static Bool
ALPSQueryHardware(LocalDevicePtr local, struct SynapticsHwInfo *synhw)
{
......@@ -260,8 +250,8 @@ ALPSAutoDevProbe(LocalDevicePtr local)
}
struct SynapticsProtocolOperations alps_proto_operations = {
ALPSDeviceOnHook,
ALPSDeviceOffHook,
NULL,
NULL,
ALPSQueryHardware,
ALPSReadHwState,
ALPSAutoDevProbe,
......
......@@ -69,11 +69,6 @@ EventDeviceOnHook(LocalDevicePtr local, SynapticsParameters *para)
}
}
static void
EventDeviceOffHook(LocalDevicePtr local)
{
}
static Bool
event_query_is_touchpad(int fd)
{
......@@ -415,7 +410,7 @@ EventAutoDevProbe(LocalDevicePtr local)
struct SynapticsProtocolOperations event_proto_operations = {
EventDeviceOnHook,
EventDeviceOffHook,
NULL,
EventQueryHardware,
EventReadHwState,
EventAutoDevProbe,
......
......@@ -444,12 +444,6 @@ ps2_print_ident(const struct SynapticsHwInfo *synhw)
}
}
static void
PS2DeviceOnHook(LocalDevicePtr local, SynapticsParameters* para)
{
}
static void
PS2DeviceOffHook(LocalDevicePtr local)
{
......@@ -756,7 +750,7 @@ PS2AutoDevProbe(LocalDevicePtr local)
}
struct SynapticsProtocolOperations psaux_proto_operations = {
PS2DeviceOnHook,
NULL,
PS2DeviceOffHook,
PS2QueryHardware,
PS2ReadHwState,
......
......@@ -100,16 +100,6 @@ PSMQueryIsSynaptics(LocalDevicePtr local)
}
}
static void
PSMDeviceOnHook(LocalDevicePtr local, SynapticsParameters *para)
{
}
static void
PSMDeviceOffHook(LocalDevicePtr local)
{
}
static void
convert_hw_info(const synapticshw_t *psm_ident, struct SynapticsHwInfo *synhw)
{
......@@ -175,8 +165,8 @@ static Bool PSMAutoDevProbe(LocalDevicePtr local)
}
struct SynapticsProtocolOperations psm_proto_operations = {
PSMDeviceOnHook,
PSMDeviceOffHook,
NULL,
NULL,
PSMQueryHardware,
PSMReadHwState,
PSMAutoDevProbe,
......
......@@ -700,7 +700,8 @@ DeviceOn(DeviceIntPtr dev)
return !Success;
}
priv->proto_ops->DeviceOnHook(local, &priv->synpara);
if (priv->proto_ops->DeviceOnHook)
priv->proto_ops->DeviceOnHook(local, &priv->synpara);
priv->comm.buffer = XisbNew(local->fd, 64);
if (!priv->comm.buffer) {
......@@ -731,7 +732,8 @@ DeviceOff(DeviceIntPtr dev)
TimerFree(priv->timer);
priv->timer = NULL;
xf86RemoveEnabledDevice(local);
priv->proto_ops->DeviceOffHook(local);
if (priv->proto_ops->DeviceOffHook)
priv->proto_ops->DeviceOffHook(local);
if (priv->comm.buffer) {
XisbFree(priv->comm.buffer);
priv->comm.buffer = NULL;
......@@ -2191,7 +2193,8 @@ QueryHardware(LocalDevicePtr local)
shm->synhw = priv->synhw;
} else {
xf86Msg(X_PROBED, "%s: no supported touchpad found\n", local->name);
priv->proto_ops->DeviceOffHook(local);
if (priv->proto_ops->DeviceOffHook)
priv->proto_ops->DeviceOffHook(local);
}
return TRUE;
......
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