aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/sidewinder.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/joystick/sidewinder.c')
-rw-r--r--drivers/input/joystick/sidewinder.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c
index e58b22c018e..2adf73f63c9 100644
--- a/drivers/input/joystick/sidewinder.c
+++ b/drivers/input/joystick/sidewinder.c
@@ -509,7 +509,7 @@ static void sw_poll(struct gameport *gameport)
509 509
510static int sw_open(struct input_dev *dev) 510static int sw_open(struct input_dev *dev)
511{ 511{
512 struct sw *sw = dev->private; 512 struct sw *sw = input_get_drvdata(dev);
513 513
514 gameport_start_polling(sw->gameport); 514 gameport_start_polling(sw->gameport);
515 return 0; 515 return 0;
@@ -517,7 +517,7 @@ static int sw_open(struct input_dev *dev)
517 517
518static void sw_close(struct input_dev *dev) 518static void sw_close(struct input_dev *dev)
519{ 519{
520 struct sw *sw = dev->private; 520 struct sw *sw = input_get_drvdata(dev);
521 521
522 gameport_stop_polling(sw->gameport); 522 gameport_stop_polling(sw->gameport);
523} 523}
@@ -751,8 +751,9 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv)
751 input_dev->id.vendor = GAMEPORT_ID_VENDOR_MICROSOFT; 751 input_dev->id.vendor = GAMEPORT_ID_VENDOR_MICROSOFT;
752 input_dev->id.product = sw->type; 752 input_dev->id.product = sw->type;
753 input_dev->id.version = 0x0100; 753 input_dev->id.version = 0x0100;
754 input_dev->cdev.dev = &gameport->dev; 754 input_dev->dev.parent = &gameport->dev;
755 input_dev->private = sw; 755
756 input_set_drvdata(input_dev, sw);
756 757
757 input_dev->open = sw_open; 758 input_dev->open = sw_open;
758 input_dev->close = sw_close; 759 input_dev->close = sw_close;