Commit 3abccf36 authored by Dmitry Torokhov's avatar Dmitry Torokhov

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: default avatarDmitry Torokhov <dtor@mail.ru>
parent 5014186d
...@@ -1097,6 +1097,16 @@ static inline void input_put_device(struct input_dev *dev) ...@@ -1097,6 +1097,16 @@ static inline void input_put_device(struct input_dev *dev)
class_device_put(&dev->cdev); class_device_put(&dev->cdev);
} }
static inline void *input_get_drvdata(struct input_dev *dev)
{
return dev->private;
}
static inline void input_set_drvdata(struct input_dev *dev, void *data)
{
dev->private = data;
}
int input_register_device(struct input_dev *); int input_register_device(struct input_dev *);
void input_unregister_device(struct input_dev *); void input_unregister_device(struct input_dev *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment