summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2012-12-29 03:24:52 +0000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-01-17 19:12:25 +1000
commit7d1df986e1330a02cfb74a0babae1ae78768aa52 (patch)
treec55e35f0e774ed16b4319fec8034bd0e7ddbd729
parent04439c088b6d17e6ed374c185a82ca82fe93d0d3 (diff)
Free mtdev device as well as closing it
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. [whot: amended to mtdev_close_delete in evdev_query_touch] Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit ce7565ea6683f594f1f2ab5769bf60b1337d70bd)
-rw-r--r--src/eventcomm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c
index b811da7..c930f6a 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -126,7 +126,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;
}
@@ -878,7 +878,7 @@ event_query_touch(InputInfoPtr pInfo)
}
out:
- mtdev_close(mtdev);
+ mtdev_close_delete(mtdev);
}
#endif