aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/a3d.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/a3d.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/a3d.c')
-rw-r--r--drivers/input/joystick/a3d.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/input/joystick/a3d.c b/drivers/input/joystick/a3d.c
index b11a4bbc84c4..4ac1a8f2169b 100644
--- a/drivers/input/joystick/a3d.c
+++ b/drivers/input/joystick/a3d.c
@@ -241,7 +241,7 @@ static void a3d_adc_close(struct gameport *gameport)
241 241
242static int a3d_open(struct input_dev *dev) 242static int a3d_open(struct input_dev *dev)
243{ 243{
244 struct a3d *a3d = dev->private; 244 struct a3d *a3d = input_get_drvdata(dev);
245 245
246 gameport_start_polling(a3d->gameport); 246 gameport_start_polling(a3d->gameport);
247 return 0; 247 return 0;
@@ -253,7 +253,7 @@ static int a3d_open(struct input_dev *dev)
253 253
254static void a3d_close(struct input_dev *dev) 254static void a3d_close(struct input_dev *dev)
255{ 255{
256 struct a3d *a3d = dev->private; 256 struct a3d *a3d = input_get_drvdata(dev);
257 257
258 gameport_stop_polling(a3d->gameport); 258 gameport_stop_polling(a3d->gameport);
259} 259}
@@ -315,10 +315,11 @@ static int a3d_connect(struct gameport *gameport, struct gameport_driver *drv)
315 input_dev->id.product = a3d->mode; 315 input_dev->id.product = a3d->mode;
316 input_dev->id.version = 0x0100; 316 input_dev->id.version = 0x0100;
317 input_dev->cdev.dev = &gameport->dev; 317 input_dev->cdev.dev = &gameport->dev;
318 input_dev->private = a3d;
319 input_dev->open = a3d_open; 318 input_dev->open = a3d_open;
320 input_dev->close = a3d_close; 319 input_dev->close = a3d_close;
321 320
321 input_set_drvdata(input_dev, a3d);
322
322 if (a3d->mode == A3D_MODE_PXL) { 323 if (a3d->mode == A3D_MODE_PXL) {
323 324
324 int axes[] = { ABS_X, ABS_Y, ABS_THROTTLE, ABS_RUDDER }; 325 int axes[] = { ABS_X, ABS_Y, ABS_THROTTLE, ABS_RUDDER };