From 8715c1cfadf8cce24e79d254f95bd4a84c7741f0 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Thu, 12 Apr 2007 01:34:14 -0400 Subject: Input: drivers/input/joystick - don't access dev->private directly Use input_get_drvdata() and input_set_drvdata() instead. Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/gf2k.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/input/joystick/gf2k.c') 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++) -- cgit v1.2.3