diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-04-02 00:41:00 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-04-02 00:41:00 -0400 |
commit | 3797fec17193e05dee9666b990d6c84e16b188b3 (patch) | |
tree | 59004514d9f5dbaed0825a442c1334afeb1c82ab | |
parent | a7097ff89c3204737a07eecbc83f9ae6002cc534 (diff) |
Input: remove private member from input_dev structure
Everyone should be using input_{get|set}_drvdata() by now.
Alias them to dev_{get|set}_drvdata() and remove ->private.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r-- | drivers/input/input-polldev.c | 6 | ||||
-rw-r--r-- | include/linux/input.h | 8 |
2 files changed, 5 insertions, 9 deletions
diff --git a/drivers/input/input-polldev.c b/drivers/input/input-polldev.c index 490918a5d192..0d3ce7a50fb1 100644 --- a/drivers/input/input-polldev.c +++ b/drivers/input/input-polldev.c | |||
@@ -73,7 +73,7 @@ static void input_polled_device_work(struct work_struct *work) | |||
73 | 73 | ||
74 | static int input_open_polled_device(struct input_dev *input) | 74 | static int input_open_polled_device(struct input_dev *input) |
75 | { | 75 | { |
76 | struct input_polled_dev *dev = input->private; | 76 | struct input_polled_dev *dev = input_get_drvdata(input); |
77 | int error; | 77 | int error; |
78 | 78 | ||
79 | error = input_polldev_start_workqueue(); | 79 | error = input_polldev_start_workqueue(); |
@@ -91,7 +91,7 @@ static int input_open_polled_device(struct input_dev *input) | |||
91 | 91 | ||
92 | static void input_close_polled_device(struct input_dev *input) | 92 | static void input_close_polled_device(struct input_dev *input) |
93 | { | 93 | { |
94 | struct input_polled_dev *dev = input->private; | 94 | struct input_polled_dev *dev = input_get_drvdata(input); |
95 | 95 | ||
96 | cancel_delayed_work_sync(&dev->work); | 96 | cancel_delayed_work_sync(&dev->work); |
97 | input_polldev_stop_workqueue(); | 97 | input_polldev_stop_workqueue(); |
@@ -151,10 +151,10 @@ int input_register_polled_device(struct input_polled_dev *dev) | |||
151 | { | 151 | { |
152 | struct input_dev *input = dev->input; | 152 | struct input_dev *input = dev->input; |
153 | 153 | ||
154 | input_set_drvdata(input, dev); | ||
154 | INIT_DELAYED_WORK(&dev->work, input_polled_device_work); | 155 | INIT_DELAYED_WORK(&dev->work, input_polled_device_work); |
155 | if (!dev->poll_interval) | 156 | if (!dev->poll_interval) |
156 | dev->poll_interval = 500; | 157 | dev->poll_interval = 500; |
157 | input->private = dev; | ||
158 | input->open = input_open_polled_device; | 158 | input->open = input_open_polled_device; |
159 | input->close = input_close_polled_device; | 159 | input->close = input_close_polled_device; |
160 | 160 | ||
diff --git a/include/linux/input.h b/include/linux/input.h index cae2c35d1206..28a094fcfe20 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -1025,10 +1025,6 @@ struct ff_effect { | |||
1025 | * @node: used to place the device onto input_dev_list | 1025 | * @node: used to place the device onto input_dev_list |
1026 | */ | 1026 | */ |
1027 | struct input_dev { | 1027 | struct input_dev { |
1028 | /* private: */ | ||
1029 | void *private; /* do not use */ | ||
1030 | /* public: */ | ||
1031 | |||
1032 | const char *name; | 1028 | const char *name; |
1033 | const char *phys; | 1029 | const char *phys; |
1034 | const char *uniq; | 1030 | const char *uniq; |
@@ -1238,12 +1234,12 @@ static inline void input_put_device(struct input_dev *dev) | |||
1238 | 1234 | ||
1239 | static inline void *input_get_drvdata(struct input_dev *dev) | 1235 | static inline void *input_get_drvdata(struct input_dev *dev) |
1240 | { | 1236 | { |
1241 | return dev->private; | 1237 | return dev_get_drvdata(&dev->dev); |
1242 | } | 1238 | } |
1243 | 1239 | ||
1244 | static inline void input_set_drvdata(struct input_dev *dev, void *data) | 1240 | static inline void input_set_drvdata(struct input_dev *dev, void *data) |
1245 | { | 1241 | { |
1246 | dev->private = data; | 1242 | dev_set_drvdata(&dev->dev, data); |
1247 | } | 1243 | } |
1248 | 1244 | ||
1249 | int __must_check input_register_device(struct input_dev *); | 1245 | int __must_check input_register_device(struct input_dev *); |