From: lars Date: Sat, 25 Apr 2009 16:06:27 +0000 (+0000) Subject: Close tslib device when the module is unloaded. Closes a memory leak and X-Git-Url: http://git.archive.openwrt.org/?a=commitdiff_plain;h=c4bbbd291b997494d15b994c5cd73deec4bfc1f8;p=packages.git Close tslib device when the module is unloaded. Closes a memory leak and 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 --- diff --git a/Xorg/driver/xf86-input-tslib/patches/020-close-tsdevice-when-module-is-uninitialized.patch b/Xorg/driver/xf86-input-tslib/patches/020-close-tsdevice-when-module-is-uninitialized.patch new file mode 100644 index 000000000..2af911118 --- /dev/null +++ b/Xorg/driver/xf86-input-tslib/patches/020-close-tsdevice-when-module-is-uninitialized.patch @@ -0,0 +1,24 @@ +commit b6ff79c07806789a12ca3c5260c5d0b12e212eef +Author: Lars-Peter Clausen +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); + }