aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/grip_mp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/joystick/grip_mp.c')
-rw-r--r--drivers/input/joystick/grip_mp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/input/joystick/grip_mp.c b/drivers/input/joystick/grip_mp.c
index 8120a9c40773..555319e6378c 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
563static int grip_open(struct input_dev *dev) 563static 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
575static void grip_close(struct input_dev *dev) 575static 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/*
@@ -599,8 +599,9 @@ static int register_slot(int slot, struct grip_mp *grip)
599 input_dev->id.vendor = GAMEPORT_ID_VENDOR_GRAVIS; 599 input_dev->id.vendor = GAMEPORT_ID_VENDOR_GRAVIS;
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->dev.parent = &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;