diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 01:33:51 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 01:33:51 -0400 |
commit | 3abccf36081ac827cf5d14db6837117f088937eb (patch) | |
tree | af8543fb38486f20372ebc5f38e1707a31473fd1 /include/linux/input.h | |
parent | 5014186de89708d0e9eed60526b698d5b786b707 (diff) |
Input: add input_{get|set}_drvdata() helpers
Add helpers to set up and access driver-specific data in input
device structure. Once conversion to struct driver is complete
we will drop input_dev->private and will use dev_get_drvdata()
and dev_set_drvdata().
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include/linux/input.h')
-rw-r--r-- | include/linux/input.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/input.h b/include/linux/input.h index 9bd984b2d12..d0bea975518 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -1097,6 +1097,16 @@ static inline void input_put_device(struct input_dev *dev) | |||
1097 | class_device_put(&dev->cdev); | 1097 | class_device_put(&dev->cdev); |
1098 | } | 1098 | } |
1099 | 1099 | ||
1100 | static inline void *input_get_drvdata(struct input_dev *dev) | ||
1101 | { | ||
1102 | return dev->private; | ||
1103 | } | ||
1104 | |||
1105 | static inline void input_set_drvdata(struct input_dev *dev, void *data) | ||
1106 | { | ||
1107 | dev->private = data; | ||
1108 | } | ||
1109 | |||
1100 | int input_register_device(struct input_dev *); | 1110 | int input_register_device(struct input_dev *); |
1101 | void input_unregister_device(struct input_dev *); | 1111 | void input_unregister_device(struct input_dev *); |
1102 | 1112 | ||