c4bbbd291b
allows the device to be reopended when the xserver is restarted. git-svn-id: svn://svn.openwrt.org/openwrt/packages@15407 3c298f89-4303-0410-b956-a3cf2f4a3e73
25 lines
788 B
Diff
25 lines
788 B
Diff
commit b6ff79c07806789a12ca3c5260c5d0b12e212eef
|
|
Author: Lars-Peter Clausen <lars@metafoo.de>
|
|
Date: Sat Apr 25 18:00:09 2009 +0200
|
|
|
|
Close tslib device when the module is unloaded. Closes a memory leak and allows
|
|
the device to be reopended when the xserver is restarted.
|
|
|
|
diff --git a/src/tslib.c b/src/tslib.c
|
|
index 50596b7..e7a2766 100644
|
|
--- a/src/tslib.c
|
|
+++ b/src/tslib.c
|
|
@@ -286,10 +286,12 @@ xf86TslibControlProc(DeviceIntPtr device, int what)
|
|
static void
|
|
xf86TslibUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
|
|
{
|
|
+ struct ts_priv *priv = (struct ts_priv *)(pInfo->private);
|
|
#ifdef DEBUG
|
|
ErrorF("%s\n", __FUNCTION__);
|
|
#endif
|
|
xf86TslibControlProc(pInfo->dev, DEVICE_OFF);
|
|
+ ts_close(priv->ts);
|
|
xfree(pInfo->private);
|
|
xf86DeleteInput(pInfo, 0);
|
|
}
|