aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/tmdc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/joystick/tmdc.c')
-rw-r--r--drivers/input/joystick/tmdc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/input/joystick/tmdc.c b/drivers/input/joystick/tmdc.c
index bb23ed2a04a6..3b36ee04f726 100644
--- a/drivers/input/joystick/tmdc.c
+++ b/drivers/input/joystick/tmdc.c
@@ -265,7 +265,7 @@ static void tmdc_poll(struct gameport *gameport)
265 265
266static int tmdc_open(struct input_dev *dev) 266static int tmdc_open(struct input_dev *dev)
267{ 267{
268 struct tmdc *tmdc = dev->private; 268 struct tmdc *tmdc = input_get_drvdata(dev);
269 269
270 gameport_start_polling(tmdc->gameport); 270 gameport_start_polling(tmdc->gameport);
271 return 0; 271 return 0;
@@ -273,7 +273,7 @@ static int tmdc_open(struct input_dev *dev)
273 273
274static void tmdc_close(struct input_dev *dev) 274static void tmdc_close(struct input_dev *dev)
275{ 275{
276 struct tmdc *tmdc = dev->private; 276 struct tmdc *tmdc = input_get_drvdata(dev);
277 277
278 gameport_stop_polling(tmdc->gameport); 278 gameport_stop_polling(tmdc->gameport);
279} 279}
@@ -326,8 +326,9 @@ static int tmdc_setup_port(struct tmdc *tmdc, int idx, unsigned char *data)
326 input_dev->id.vendor = GAMEPORT_ID_VENDOR_THRUSTMASTER; 326 input_dev->id.vendor = GAMEPORT_ID_VENDOR_THRUSTMASTER;
327 input_dev->id.product = model->id; 327 input_dev->id.product = model->id;
328 input_dev->id.version = 0x0100; 328 input_dev->id.version = 0x0100;
329 input_dev->cdev.dev = &tmdc->gameport->dev; 329 input_dev->dev.parent = &tmdc->gameport->dev;
330 input_dev->private = tmdc; 330
331 input_set_drvdata(input_dev, tmdc);
331 332
332 input_dev->open = tmdc_open; 333 input_dev->open = tmdc_open;
333 input_dev->close = tmdc_close; 334 input_dev->close = tmdc_close;