[PATCH synaptics] Free mtdev device as well as closing it

Daniel Stone daniel at fooishbar.org
Fri Dec 28 19:24:52 PST 2012


mtdev_close_delete() is to mtdev_new_open() as mtdev_close() is to
mtdev_open().  So, since we're using mtdev_new_open(), we need to use
mtdev_close_delete() instead of just mtdev_close() to actually free
everything.

Fixes an eventual failure to open the touchpad device after a lot of
suspend/resume cycles.

Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
 src/eventcomm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/eventcomm.c b/src/eventcomm.c
index b1d5460..8508e6a 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -122,7 +122,7 @@ UninitializeTouch(InputInfoPtr pInfo)
         proto_data->last_mt_vals = NULL;
     }
 
-    mtdev_close(proto_data->mtdev);
+    mtdev_close_delete(proto_data->mtdev);
     proto_data->mtdev = NULL;
     proto_data->num_touches = 0;
 }
-- 
1.7.10.4



More information about the xorg-devel mailing list