summaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/analog.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-04-12 01:34:14 -0400
committerDmitry Torokhov <dtor@insightbb.com>2007-04-12 01:34:14 -0400
commit8715c1cfadf8cce24e79d254f95bd4a84c7741f0 (patch)
tree08d68f40f09b49c0bbb2c7185d879a8a8121950b /drivers/input/joystick/analog.c
parent40b9b0b82e664bfdf26fd33014d52e23ff80b9f4 (diff)
downloadlinux-stable-8715c1cfadf8cce24e79d254f95bd4a84c7741f0.tar.gz
linux-stable-8715c1cfadf8cce24e79d254f95bd4a84c7741f0.tar.bz2
linux-stable-8715c1cfadf8cce24e79d254f95bd4a84c7741f0.zip
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/analog.c')
-rw-r--r--drivers/input/joystick/analog.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c
index 51f1e4bfff3e..7244e296bb26 100644
--- a/drivers/input/joystick/analog.c
+++ b/drivers/input/joystick/analog.c
@@ -343,7 +343,7 @@ static void analog_poll(struct gameport *gameport)
static int analog_open(struct input_dev *dev)
{
- struct analog_port *port = dev->private;
+ struct analog_port *port = input_get_drvdata(dev);
gameport_start_polling(port->gameport);
return 0;
@@ -355,7 +355,7 @@ static int analog_open(struct input_dev *dev)
static void analog_close(struct input_dev *dev)
{
- struct analog_port *port = dev->private;
+ struct analog_port *port = input_get_drvdata(dev);
gameport_stop_polling(port->gameport);
}
@@ -450,9 +450,11 @@ static int analog_init_device(struct analog_port *port, struct analog *analog, i
input_dev->id.product = analog->mask >> 4;
input_dev->id.version = 0x0100;
+ input_set_drvdata(input_dev, port);
+
input_dev->open = analog_open;
input_dev->close = analog_close;
- input_dev->private = port;
+
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
for (i = j = 0; i < 4; i++)