aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/guillemot.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-04-12 01:34:14 -0400
committerDmitry Torokhov <dtor@insightbb.com>2007-04-12 01:34:14 -0400
commit8715c1cfadf8cce24e79d254f95bd4a84c7741f0 (patch)
tree08d68f40f09b49c0bbb2c7185d879a8a8121950b /drivers/input/joystick/guillemot.c
parent40b9b0b82e664bfdf26fd33014d52e23ff80b9f4 (diff)
Input: drivers/input/joystick - don't access dev->private directly
Use input_get_drvdata() and input_set_drvdata() instead. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/joystick/guillemot.c')
-rw-r--r--drivers/input/joystick/guillemot.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/input/joystick/guillemot.c b/drivers/input/joystick/guillemot.c
index dbc5d92858b8..3e022dc83941 100644
--- a/drivers/input/joystick/guillemot.c
+++ b/drivers/input/joystick/guillemot.c
@@ -156,7 +156,7 @@ static void guillemot_poll(struct gameport *gameport)
156 156
157static int guillemot_open(struct input_dev *dev) 157static int guillemot_open(struct input_dev *dev)
158{ 158{
159 struct guillemot *guillemot = dev->private; 159 struct guillemot *guillemot = input_get_drvdata(dev);
160 160
161 gameport_start_polling(guillemot->gameport); 161 gameport_start_polling(guillemot->gameport);
162 return 0; 162 return 0;
@@ -168,7 +168,7 @@ static int guillemot_open(struct input_dev *dev)
168 168
169static void guillemot_close(struct input_dev *dev) 169static void guillemot_close(struct input_dev *dev)
170{ 170{
171 struct guillemot *guillemot = dev->private; 171 struct guillemot *guillemot = input_get_drvdata(dev);
172 172
173 gameport_stop_polling(guillemot->gameport); 173 gameport_stop_polling(guillemot->gameport);
174} 174}
@@ -232,7 +232,8 @@ static int guillemot_connect(struct gameport *gameport, struct gameport_driver *
232 input_dev->id.product = guillemot_type[i].id; 232 input_dev->id.product = guillemot_type[i].id;
233 input_dev->id.version = (int)data[14] << 8 | data[15]; 233 input_dev->id.version = (int)data[14] << 8 | data[15];
234 input_dev->cdev.dev = &gameport->dev; 234 input_dev->cdev.dev = &gameport->dev;
235 input_dev->private = guillemot; 235
236 input_set_drvdata(input_dev, guillemot);
236 237
237 input_dev->open = guillemot_open; 238 input_dev->open = guillemot_open;
238 input_dev->close = guillemot_close; 239 input_dev->close = guillemot_close;