aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/gf2k.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/gf2k.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/gf2k.c')
-rw-r--r--drivers/input/joystick/gf2k.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/input/joystick/gf2k.c b/drivers/input/joystick/gf2k.c
index bacbab5d1b6f..ac7db7a1f8db 100644
--- a/drivers/input/joystick/gf2k.c
+++ b/drivers/input/joystick/gf2k.c
@@ -220,7 +220,7 @@ static void gf2k_poll(struct gameport *gameport)
220 220
221static int gf2k_open(struct input_dev *dev) 221static int gf2k_open(struct input_dev *dev)
222{ 222{
223 struct gf2k *gf2k = dev->private; 223 struct gf2k *gf2k = input_get_drvdata(dev);
224 224
225 gameport_start_polling(gf2k->gameport); 225 gameport_start_polling(gf2k->gameport);
226 return 0; 226 return 0;
@@ -228,7 +228,7 @@ static int gf2k_open(struct input_dev *dev)
228 228
229static void gf2k_close(struct input_dev *dev) 229static void gf2k_close(struct input_dev *dev)
230{ 230{
231 struct gf2k *gf2k = dev->private; 231 struct gf2k *gf2k = input_get_drvdata(dev);
232 232
233 gameport_stop_polling(gf2k->gameport); 233 gameport_stop_polling(gf2k->gameport);
234} 234}
@@ -309,10 +309,12 @@ static int gf2k_connect(struct gameport *gameport, struct gameport_driver *drv)
309 input_dev->id.product = gf2k->id; 309 input_dev->id.product = gf2k->id;
310 input_dev->id.version = 0x0100; 310 input_dev->id.version = 0x0100;
311 input_dev->cdev.dev = &gameport->dev; 311 input_dev->cdev.dev = &gameport->dev;
312 input_dev->private = gf2k; 312
313 input_set_drvdata(input_dev, gf2k);
313 314
314 input_dev->open = gf2k_open; 315 input_dev->open = gf2k_open;
315 input_dev->close = gf2k_close; 316 input_dev->close = gf2k_close;
317
316 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 318 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
317 319
318 for (i = 0; i < gf2k_axes[gf2k->id]; i++) 320 for (i = 0; i < gf2k_axes[gf2k->id]; i++)