Some stability and cleanup patches.
git-svn-id: svn://svn.openwrt.org/openwrt/packages@14341 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
c157bbe4a8
commit
e8d449eb38
@ -0,0 +1,29 @@
|
||||
commit fe65976e2f006643950e70d33684b91c33a87e3a
|
||||
Author: Lars-Peter Clausen <lars@metafoo.de>
|
||||
Date: Sun Feb 1 16:42:27 2009 +0100
|
||||
|
||||
Rename "TslibDevice" option to "Device" to be more consistant with other
|
||||
drivers.
|
||||
|
||||
diff --git a/src/tslib.c b/src/tslib.c
|
||||
index edc14b2..e91a949 100644
|
||||
--- a/src/tslib.c
|
||||
+++ b/src/tslib.c
|
||||
@@ -73,7 +73,7 @@ struct ts_priv {
|
||||
};
|
||||
|
||||
static const char *DEFAULTS[] = {
|
||||
- "TslibDevice", "/dev/event0",
|
||||
+ "Device", "/dev/event0",
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -334,7 +334,7 @@ xf86TslibInit(InputDriverPtr drv, IDevPtr dev, int flags)
|
||||
priv->rotate = TSLIB_ROTATE_NONE;
|
||||
}
|
||||
|
||||
- s = xf86SetStrOption(pInfo->options, "TslibDevice", NULL);
|
||||
+ s = xf86SetStrOption(pInfo->options, "Device", NULL);
|
||||
|
||||
priv->ts = ts_open(s, 0);
|
||||
if (!priv->ts) {
|
@ -0,0 +1,58 @@
|
||||
commit 69fcc78ea931f8a84497f4ee9021f4493f45a778
|
||||
Author: Lars-Peter Clausen <lars@metafoo.de>
|
||||
Date: Sun Feb 1 16:44:24 2009 +0100
|
||||
|
||||
Put #ifdef DEBUG around debug output.
|
||||
|
||||
diff --git a/src/tslib.c b/src/tslib.c
|
||||
index e91a949..ad43abb 100644
|
||||
--- a/src/tslib.c
|
||||
+++ b/src/tslib.c
|
||||
@@ -80,21 +80,27 @@ static const char *DEFAULTS[] = {
|
||||
static void
|
||||
BellProc(int percent, DeviceIntPtr pDev, pointer ctrl, int unused)
|
||||
{
|
||||
+#ifdef DEBUG
|
||||
ErrorF("%s\n", __FUNCTION__);
|
||||
+#endif
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
KeyControlProc(DeviceIntPtr pDev, KeybdCtrl * ctrl)
|
||||
{
|
||||
+#ifdef DEBUG
|
||||
ErrorF("%s\n", __FUNCTION__);
|
||||
+#endif
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
PointerControlProc(DeviceIntPtr dev, PtrCtrl * ctrl)
|
||||
{
|
||||
+#ifdef DEBUG
|
||||
ErrorF("%s\n", __FUNCTION__);
|
||||
+#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -186,7 +192,9 @@ xf86TslibControlProc(DeviceIntPtr device, int what)
|
||||
int i;
|
||||
struct ts_priv *priv;
|
||||
|
||||
+#ifdef DEBUG
|
||||
ErrorF("%s\n", __FUNCTION__);
|
||||
+#endif
|
||||
pInfo = device->public.devicePrivate;
|
||||
priv = pInfo->private;
|
||||
|
||||
@@ -258,7 +266,9 @@ xf86TslibControlProc(DeviceIntPtr device, int what)
|
||||
static void
|
||||
xf86TslibUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
|
||||
{
|
||||
+#ifdef DEBUG
|
||||
ErrorF("%s\n", __FUNCTION__);
|
||||
+#endif
|
||||
xf86TslibControlProc(pInfo->dev, DEVICE_OFF);
|
||||
xfree(pInfo->private);
|
||||
}
|
39
Xorg/driver/xf86-input-tslib/patches/012-deleteinput.patch
Normal file
39
Xorg/driver/xf86-input-tslib/patches/012-deleteinput.patch
Normal file
@ -0,0 +1,39 @@
|
||||
commit de4ec145ea88253dc469ee81f094fa73de36b773
|
||||
Author: Lars-Peter Clausen <lars@metafoo.de>
|
||||
Date: Sun Feb 1 16:54:55 2009 +0100
|
||||
|
||||
Call xf86DeleteInput in UnInit or if something goes wrong in the Init procedure.
|
||||
If xf86DeleteInput is not called the server will end up with corrupted memory.
|
||||
|
||||
diff --git a/src/tslib.c b/src/tslib.c
|
||||
index ad43abb..3eba078 100644
|
||||
--- a/src/tslib.c
|
||||
+++ b/src/tslib.c
|
||||
@@ -271,6 +271,7 @@ xf86TslibUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
|
||||
#endif
|
||||
xf86TslibControlProc(pInfo->dev, DEVICE_OFF);
|
||||
xfree(pInfo->private);
|
||||
+ xf86DeleteInput(pInfo, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -347,15 +348,17 @@ xf86TslibInit(InputDriverPtr drv, IDevPtr dev, int flags)
|
||||
s = xf86SetStrOption(pInfo->options, "Device", NULL);
|
||||
|
||||
priv->ts = ts_open(s, 0);
|
||||
+ xfree(s);
|
||||
+
|
||||
if (!priv->ts) {
|
||||
ErrorF("ts_open failed (device=%s)\n",s);
|
||||
+ xf86DeleteInput(pInfo, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- xfree(s);
|
||||
-
|
||||
if (ts_config(priv->ts)) {
|
||||
ErrorF("ts_config failed\n");
|
||||
+ xf86DeleteInput(pInfo, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user