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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user