[PATCH] Don't destroy the timer on DeviceOff.

Adam Jackson ajax at redhat.com
Thu Dec 10 07:29:03 PST 2009


DeviceOff is VT switch, DeviceClose is unplug.  We need the timer
pre-allocated since we set it during the signal handler and so can't
allocate it then, so merely cancel it at DeviceOff, not delete it.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 src/synaptics.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/synaptics.c b/src/synaptics.c
index d9b8f50..d2fa2c9 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -779,8 +779,7 @@ DeviceOff(DeviceIntPtr dev)
     DBG(3, "Synaptics DeviceOff called\n");
 
     if (local->fd != -1) {
-	TimerFree(priv->timer);
-	priv->timer = NULL;
+	TimerCancel(priv->timer);
 	xf86RemoveEnabledDevice(local);
         if (priv->proto_ops->DeviceOffHook)
             priv->proto_ops->DeviceOffHook(local);
-- 
1.6.5.2



More information about the xorg-devel mailing list