mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 07:31:41 +00:00
Input: implement managed polled input devices
Managed resources are becoming more and more popular in drivers. Let's implement managed polled input devices, to complement managed regular input devices. Similarly to managed regular input devices only one new call devm_input_allocate_polled_device() is added and the rest of APIs is modified to work with both managed and non-managed devices. Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Tested-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
d1fefd5b73
commit
bf1de9761c
2 changed files with 119 additions and 2 deletions
|
@ -48,9 +48,12 @@ struct input_polled_dev {
|
|||
|
||||
/* private: */
|
||||
struct delayed_work work;
|
||||
|
||||
bool devres_managed;
|
||||
};
|
||||
|
||||
struct input_polled_dev *input_allocate_polled_device(void);
|
||||
struct input_polled_dev *devm_input_allocate_polled_device(struct device *dev);
|
||||
void input_free_polled_device(struct input_polled_dev *dev);
|
||||
int input_register_polled_device(struct input_polled_dev *dev);
|
||||
void input_unregister_polled_device(struct input_polled_dev *dev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue