aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/input-polldev.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2014-04-28 10:49:51 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-05-14 16:40:04 -0700
commitbf1de9761c21f56d5b0c6a0acd3b792d801c61e6 (patch)
tree41f79fa2df689dd2a15f680078fa4f82e7f759c5 /include/linux/input-polldev.h
parentInput: remove race when instantiating polled device attributes (diff)
downloadlinux-dev-bf1de9761c21f56d5b0c6a0acd3b792d801c61e6.tar.xz
linux-dev-bf1de9761c21f56d5b0c6a0acd3b792d801c61e6.zip
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);