diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 05:34:14 (GMT) |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 05:34:14 (GMT) |
commit | 8715c1cfadf8cce24e79d254f95bd4a84c7741f0 (patch) | |
tree | 08d68f40f09b49c0bbb2c7185d879a8a8121950b /drivers/input/joystick/tmdc.c | |
parent | 40b9b0b82e664bfdf26fd33014d52e23ff80b9f4 (diff) | |
download | linux-8715c1cfadf8cce24e79d254f95bd4a84c7741f0.tar.xz |
Input: drivers/input/joystick - don't access dev->private directly
Use input_get_drvdata() and input_set_drvdata() instead.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/joystick/tmdc.c')
-rw-r--r-- | drivers/input/joystick/tmdc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/input/joystick/tmdc.c b/drivers/input/joystick/tmdc.c index bb23ed2..53260d1 100644 --- a/drivers/input/joystick/tmdc.c +++ b/drivers/input/joystick/tmdc.c @@ -265,7 +265,7 @@ static void tmdc_poll(struct gameport *gameport) static int tmdc_open(struct input_dev *dev) { - struct tmdc *tmdc = dev->private; + struct tmdc *tmdc = input_get_drvdata(dev); gameport_start_polling(tmdc->gameport); return 0; @@ -273,7 +273,7 @@ static int tmdc_open(struct input_dev *dev) static void tmdc_close(struct input_dev *dev) { - struct tmdc *tmdc = dev->private; + struct tmdc *tmdc = input_get_drvdata(dev); gameport_stop_polling(tmdc->gameport); } @@ -327,7 +327,8 @@ static int tmdc_setup_port(struct tmdc *tmdc, int idx, unsigned char *data) input_dev->id.product = model->id; input_dev->id.version = 0x0100; input_dev->cdev.dev = &tmdc->gameport->dev; - input_dev->private = tmdc; + + input_set_drvdata(input_dev, tmdc); input_dev->open = tmdc_open; input_dev->close = tmdc_close; |