summaryrefslogtreecommitdiff
path: root/drivers/input/joystick/gf2k.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/gf2k.c
parent40b9b0b82e664bfdf26fd33014d52e23ff80b9f4 (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/gf2k.c')
-rw-r--r--drivers/input/joystick/gf2k.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/input/joystick/gf2k.c b/drivers/input/joystick/gf2k.c
index bacbab5d1b6f..ac7db7a1f8db 100644
--- a/drivers/input/joystick/gf2k.c
+++ b/drivers/input/joystick/gf2k.c
@@ -220,7 +220,7 @@ static void gf2k_poll(struct gameport *gameport)
static int gf2k_open(struct input_dev *dev)
{
- struct gf2k *gf2k = dev->private;
+ struct gf2k *gf2k = input_get_drvdata(dev);
gameport_start_polling(gf2k->gameport);
return 0;
@@ -228,7 +228,7 @@ static int gf2k_open(struct input_dev *dev)
static void gf2k_close(struct input_dev *dev)
{
- struct gf2k *gf2k = dev->private;
+ struct gf2k *gf2k = input_get_drvdata(dev);
gameport_stop_polling(gf2k->gameport);
}
@@ -309,10 +309,12 @@ static int gf2k_connect(struct gameport *gameport, struct gameport_driver *drv)
input_dev->id.product = gf2k->id;
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &gameport->dev;
- input_dev->private = gf2k;
+
+ input_set_drvdata(input_dev, gf2k);
input_dev->open = gf2k_open;
input_dev->close = gf2k_close;
+
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
for (i = 0; i < gf2k_axes[gf2k->id]; i++)