summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-03-17 13:52:43 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-03-26 15:12:40 +1000
commitba0d227a6da35dd21ba48ded65cabff16ef423ce (patch)
treeb6a89c96a5687503caf7adde2d4852f5d56dd2a3
parent5c811a864e8927a8dfcf9bc25ffe0265b5ed8025 (diff)
After closing the fd, reset it to -1.
A DeviceOff() followed by DeviceClose() (which calls DeviceOff()) would try to close the fd twice, in addition to calling various hooks. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> (cherry picked from commit a07fe65031ffa7e8d88898d763bdbc88899fb1e4) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/synaptics.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index 6cbdcb8..9997674 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -801,6 +801,7 @@ DeviceOff(DeviceIntPtr dev)
priv->comm.buffer = NULL;
}
xf86CloseSerial(local->fd);
+ local->fd = -1;
}
dev->public.on = FALSE;
return Success;