diff options
Diffstat (limited to 'drivers/input/joystick/analog.c')
-rw-r--r-- | drivers/input/joystick/analog.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c index 51f1e4bfff3e..7244e296bb26 100644 --- a/drivers/input/joystick/analog.c +++ b/drivers/input/joystick/analog.c | |||
@@ -343,7 +343,7 @@ static void analog_poll(struct gameport *gameport) | |||
343 | 343 | ||
344 | static int analog_open(struct input_dev *dev) | 344 | static int analog_open(struct input_dev *dev) |
345 | { | 345 | { |
346 | struct analog_port *port = dev->private; | 346 | struct analog_port *port = input_get_drvdata(dev); |
347 | 347 | ||
348 | gameport_start_polling(port->gameport); | 348 | gameport_start_polling(port->gameport); |
349 | return 0; | 349 | return 0; |
@@ -355,7 +355,7 @@ static int analog_open(struct input_dev *dev) | |||
355 | 355 | ||
356 | static void analog_close(struct input_dev *dev) | 356 | static void analog_close(struct input_dev *dev) |
357 | { | 357 | { |
358 | struct analog_port *port = dev->private; | 358 | struct analog_port *port = input_get_drvdata(dev); |
359 | 359 | ||
360 | gameport_stop_polling(port->gameport); | 360 | gameport_stop_polling(port->gameport); |
361 | } | 361 | } |
@@ -450,9 +450,11 @@ static int analog_init_device(struct analog_port *port, struct analog *analog, i | |||
450 | input_dev->id.product = analog->mask >> 4; | 450 | input_dev->id.product = analog->mask >> 4; |
451 | input_dev->id.version = 0x0100; | 451 | input_dev->id.version = 0x0100; |
452 | 452 | ||
453 | input_set_drvdata(input_dev, port); | ||
454 | |||
453 | input_dev->open = analog_open; | 455 | input_dev->open = analog_open; |
454 | input_dev->close = analog_close; | 456 | input_dev->close = analog_close; |
455 | input_dev->private = port; | 457 | |
456 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 458 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
457 | 459 | ||
458 | for (i = j = 0; i < 4; i++) | 460 | for (i = j = 0; i < 4; i++) |