diff options
author | Alexandru Ardelean <alexandru.ardelean@analog.com> | 2020-11-19 09:41:46 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-11-19 10:18:24 +0300 |
commit | 760a1219ff264c4bb68ae561bf4d5eea5daac8dc (patch) | |
tree | 5e28902688a0ec92a5637a0b037f84e1824d7093 /include/linux/input | |
parent | 41d7d26b8fb26e7e8056c1a3b6cf358d40cb367a (diff) | |
download | linux-760a1219ff264c4bb68ae561bf4d5eea5daac8dc.tar.xz |
Input: adp5589-keys - use device-managed function in adp5589_keypad_add()
This change makes use of the devm_input_allocate_device() function, which
gets rid of the input_free_device() and input_unregister_device() calls.
When a device is allocated via input_allocate_device(), the
input_register_device() call will also be device-managed, so there is no
longer need to manually call unregister.
Also, the irq is allocated with the devm_request_threaded_irq(), so with
these two changes, the adp5589_keypad_remove() function is no longer
needed.
This cleans up the error & exit paths.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201112074308.71351-3-alexandru.ardelean@analog.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'include/linux/input')
0 files changed, 0 insertions, 0 deletions