diff options
Diffstat (limited to 'drivers/input/joystick/a3d.c')
-rw-r--r-- | drivers/input/joystick/a3d.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/input/joystick/a3d.c b/drivers/input/joystick/a3d.c index b11a4bbc84c4..4ac1a8f2169b 100644 --- a/drivers/input/joystick/a3d.c +++ b/drivers/input/joystick/a3d.c | |||
@@ -241,7 +241,7 @@ static void a3d_adc_close(struct gameport *gameport) | |||
241 | 241 | ||
242 | static int a3d_open(struct input_dev *dev) | 242 | static int a3d_open(struct input_dev *dev) |
243 | { | 243 | { |
244 | struct a3d *a3d = dev->private; | 244 | struct a3d *a3d = input_get_drvdata(dev); |
245 | 245 | ||
246 | gameport_start_polling(a3d->gameport); | 246 | gameport_start_polling(a3d->gameport); |
247 | return 0; | 247 | return 0; |
@@ -253,7 +253,7 @@ static int a3d_open(struct input_dev *dev) | |||
253 | 253 | ||
254 | static void a3d_close(struct input_dev *dev) | 254 | static void a3d_close(struct input_dev *dev) |
255 | { | 255 | { |
256 | struct a3d *a3d = dev->private; | 256 | struct a3d *a3d = input_get_drvdata(dev); |
257 | 257 | ||
258 | gameport_stop_polling(a3d->gameport); | 258 | gameport_stop_polling(a3d->gameport); |
259 | } | 259 | } |
@@ -315,10 +315,11 @@ static int a3d_connect(struct gameport *gameport, struct gameport_driver *drv) | |||
315 | input_dev->id.product = a3d->mode; | 315 | input_dev->id.product = a3d->mode; |
316 | input_dev->id.version = 0x0100; | 316 | input_dev->id.version = 0x0100; |
317 | input_dev->cdev.dev = &gameport->dev; | 317 | input_dev->cdev.dev = &gameport->dev; |
318 | input_dev->private = a3d; | ||
319 | input_dev->open = a3d_open; | 318 | input_dev->open = a3d_open; |
320 | input_dev->close = a3d_close; | 319 | input_dev->close = a3d_close; |
321 | 320 | ||
321 | input_set_drvdata(input_dev, a3d); | ||
322 | |||
322 | if (a3d->mode == A3D_MODE_PXL) { | 323 | if (a3d->mode == A3D_MODE_PXL) { |
323 | 324 | ||
324 | int axes[] = { ABS_X, ABS_Y, ABS_THROTTLE, ABS_RUDDER }; | 325 | int axes[] = { ABS_X, ABS_Y, ABS_THROTTLE, ABS_RUDDER }; |