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

Dan Nicholson dbn.lists at gmail.com
Sat Dec 29 06:01:05 PST 2012


On Fri, Dec 28, 2012 at 9:24 PM, Daniel Stone <daniel at fooishbar.org> wrote:
> 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;
>  }

>From what I can tell, evdev_query_touch() has the same imbalanced
mtdev_new_open/mtdev_close imbalance. With that fix, too,

Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>


More information about the xorg-devel mailing list