diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 01:34:14 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 01:34:14 -0400 |
commit | 8715c1cfadf8cce24e79d254f95bd4a84c7741f0 (patch) | |
tree | 08d68f40f09b49c0bbb2c7185d879a8a8121950b /drivers/input/joystick/guillemot.c | |
parent | 40b9b0b82e664bfdf26fd33014d52e23ff80b9f4 (diff) |
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/guillemot.c')
-rw-r--r-- | drivers/input/joystick/guillemot.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/input/joystick/guillemot.c b/drivers/input/joystick/guillemot.c index dbc5d92858b8..3e022dc83941 100644 --- a/drivers/input/joystick/guillemot.c +++ b/drivers/input/joystick/guillemot.c @@ -156,7 +156,7 @@ static void guillemot_poll(struct gameport *gameport) static int guillemot_open(struct input_dev *dev) { - struct guillemot *guillemot = dev->private; + struct guillemot *guillemot = input_get_drvdata(dev); gameport_start_polling(guillemot->gameport); return 0; @@ -168,7 +168,7 @@ static int guillemot_open(struct input_dev *dev) static void guillemot_close(struct input_dev *dev) { - struct guillemot *guillemot = dev->private; + struct guillemot *guillemot = input_get_drvdata(dev); gameport_stop_polling(guillemot->gameport); } @@ -232,7 +232,8 @@ static int guillemot_connect(struct gameport *gameport, struct gameport_driver * input_dev->id.product = guillemot_type[i].id; input_dev->id.version = (int)data[14] << 8 | data[15]; input_dev->cdev.dev = &gameport->dev; - input_dev->private = guillemot; + + input_set_drvdata(input_dev, guillemot); input_dev->open = guillemot_open; input_dev->close = guillemot_close; |