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 <dan...@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

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to