diff options
Diffstat (limited to 'drivers/input/joystick/grip_mp.c')
-rw-r--r-- | drivers/input/joystick/grip_mp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/input/joystick/grip_mp.c b/drivers/input/joystick/grip_mp.c index 8120a9c40773..1771d5d86790 100644 --- a/drivers/input/joystick/grip_mp.c +++ b/drivers/input/joystick/grip_mp.c | |||
@@ -562,7 +562,7 @@ static void grip_poll(struct gameport *gameport) | |||
562 | 562 | ||
563 | static int grip_open(struct input_dev *dev) | 563 | static int grip_open(struct input_dev *dev) |
564 | { | 564 | { |
565 | struct grip_mp *grip = dev->private; | 565 | struct grip_mp *grip = input_get_drvdata(dev); |
566 | 566 | ||
567 | gameport_start_polling(grip->gameport); | 567 | gameport_start_polling(grip->gameport); |
568 | return 0; | 568 | return 0; |
@@ -574,9 +574,9 @@ static int grip_open(struct input_dev *dev) | |||
574 | 574 | ||
575 | static void grip_close(struct input_dev *dev) | 575 | static void grip_close(struct input_dev *dev) |
576 | { | 576 | { |
577 | struct grip_mp *grip = dev->private; | 577 | struct grip_mp *grip = input_get_drvdata(dev); |
578 | 578 | ||
579 | gameport_start_polling(grip->gameport); | 579 | gameport_stop_polling(grip->gameport); |
580 | } | 580 | } |
581 | 581 | ||
582 | /* | 582 | /* |
@@ -600,7 +600,8 @@ static int register_slot(int slot, struct grip_mp *grip) | |||
600 | input_dev->id.product = 0x0100 + port->mode; | 600 | input_dev->id.product = 0x0100 + port->mode; |
601 | input_dev->id.version = 0x0100; | 601 | input_dev->id.version = 0x0100; |
602 | input_dev->cdev.dev = &grip->gameport->dev; | 602 | input_dev->cdev.dev = &grip->gameport->dev; |
603 | input_dev->private = grip; | 603 | |
604 | input_set_drvdata(input_dev, grip); | ||
604 | 605 | ||
605 | input_dev->open = grip_open; | 606 | input_dev->open = grip_open; |
606 | input_dev->close = grip_close; | 607 | input_dev->close = grip_close; |