Re: [PATCH] Input: sparse-keymap - add managed version of sparse_keymap_setup()

2017-03-01 Thread Dmitry Torokhov
On Wed, Mar 01, 2017 at 11:37:14AM +0100, Michał Kępień wrote: > > On Tue, Feb 28, 2017 at 10:45:25AM +0100, Michał Kępień wrote: > > > Some platform drivers use devm_input_allocate_device() together with > > > sparse_keymap_setup() in their .probe callbacks. While using the former > > > simplifie

Re: [PATCH] Input: sparse-keymap - add managed version of sparse_keymap_setup()

2017-03-01 Thread Michał Kępień
> On Tue, Feb 28, 2017 at 10:45:25AM +0100, Michał Kępień wrote: > > Some platform drivers use devm_input_allocate_device() together with > > sparse_keymap_setup() in their .probe callbacks. While using the former > > simplifies error handling, using the latter necessitates calling > > sparse_keym

Re: [PATCH] Input: sparse-keymap - add managed version of sparse_keymap_setup()

2017-02-28 Thread Dmitry Torokhov
On Tue, Feb 28, 2017 at 10:45:25AM +0100, Michał Kępień wrote: > Some platform drivers use devm_input_allocate_device() together with > sparse_keymap_setup() in their .probe callbacks. While using the former > simplifies error handling, using the latter necessitates calling > sparse_keymap_free()

[PATCH] Input: sparse-keymap - add managed version of sparse_keymap_setup()

2017-02-28 Thread Michał Kępień
Some platform drivers use devm_input_allocate_device() together with sparse_keymap_setup() in their .probe callbacks. While using the former simplifies error handling, using the latter necessitates calling sparse_keymap_free() in the error path and upon module unloading to avoid leaking the copy o