diff options
Diffstat (limited to 'drivers/input/joystick/grip.c')
-rw-r--r-- | drivers/input/joystick/grip.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/input/joystick/grip.c b/drivers/input/joystick/grip.c index 17a90c436de..73eb5ab6f14 100644 --- a/drivers/input/joystick/grip.c +++ b/drivers/input/joystick/grip.c @@ -285,7 +285,7 @@ static void grip_poll(struct gameport *gameport) static int grip_open(struct input_dev *dev) { - struct grip *grip = dev->private; + struct grip *grip = input_get_drvdata(dev); gameport_start_polling(grip->gameport); return 0; @@ -293,7 +293,7 @@ static int grip_open(struct input_dev *dev) static void grip_close(struct input_dev *dev) { - struct grip *grip = dev->private; + struct grip *grip = input_get_drvdata(dev); gameport_stop_polling(grip->gameport); } @@ -363,8 +363,9 @@ static int grip_connect(struct gameport *gameport, struct gameport_driver *drv) input_dev->id.vendor = GAMEPORT_ID_VENDOR_GRAVIS; input_dev->id.product = grip->mode[i]; input_dev->id.version = 0x0100; - input_dev->cdev.dev = &gameport->dev; - input_dev->private = grip; + input_dev->dev.parent = &gameport->dev; + + input_set_drvdata(input_dev, grip); input_dev->open = grip_open; input_dev->close = grip_close; |