diff options
Diffstat (limited to 'drivers/input/joystick/gf2k.c')
-rw-r--r-- | drivers/input/joystick/gf2k.c | 8 |
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 | ||
221 | static int gf2k_open(struct input_dev *dev) | 221 | static 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 | ||
229 | static void gf2k_close(struct input_dev *dev) | 229 | static 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++) |