summaryrefslogtreecommitdiff
path: root/include/linux/input-polldev.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2014-04-28 21:49:51 +0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-05-15 03:40:04 +0400
commitbf1de9761c21f56d5b0c6a0acd3b792d801c61e6 (patch)
tree41f79fa2df689dd2a15f680078fa4f82e7f759c5 /include/linux/input-polldev.h
parentd1fefd5b73ba9fe301441e84ebea06044d8f5ea4 (diff)
downloadlinux-bf1de9761c21f56d5b0c6a0acd3b792d801c61e6.tar.xz
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>
Diffstat (limited to 'include/linux/input-polldev.h')
-rw-r--r--include/linux/input-polldev.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/input-polldev.h b/include/linux/input-polldev.h
index ce0b72464eb8..2465182670db 100644
--- a/include/linux/input-polldev.h
+++ b/include/linux/input-polldev.h
@@ -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);