summaryrefslogtreecommitdiff
path: root/drivers/input/joystick/adi.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-04-12 09:34:14 +0400
committerDmitry Torokhov <dtor@insightbb.com>2007-04-12 09:34:14 +0400
commit8715c1cfadf8cce24e79d254f95bd4a84c7741f0 (patch)
tree08d68f40f09b49c0bbb2c7185d879a8a8121950b /drivers/input/joystick/adi.c
parent40b9b0b82e664bfdf26fd33014d52e23ff80b9f4 (diff)
downloadlinux-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/adi.c')
-rw-r--r--drivers/input/joystick/adi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/input/joystick/adi.c b/drivers/input/joystick/adi.c
index 6279ced8a35b..e8353526736f 100644
--- a/drivers/input/joystick/adi.c
+++ b/drivers/input/joystick/adi.c
@@ -290,7 +290,7 @@ static void adi_poll(struct gameport *gameport)
static int adi_open(struct input_dev *dev)
{
- struct adi_port *port = dev->private;
+ struct adi_port *port = input_get_drvdata(dev);
gameport_start_polling(port->gameport);
return 0;
@@ -302,7 +302,7 @@ static int adi_open(struct input_dev *dev)
static void adi_close(struct input_dev *dev)
{
- struct adi_port *port = dev->private;
+ struct adi_port *port = input_get_drvdata(dev);
gameport_stop_polling(port->gameport);
}
@@ -425,7 +425,8 @@ static int adi_init_input(struct adi *adi, struct adi_port *port, int half)
input_dev->id.product = adi->id;
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &port->gameport->dev;
- input_dev->private = port;
+
+ input_set_drvdata(input_dev, port);
input_dev->open = adi_open;
input_dev->close = adi_close;