diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 01:34:14 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 01:34:14 -0400 |
commit | 8715c1cfadf8cce24e79d254f95bd4a84c7741f0 (patch) | |
tree | 08d68f40f09b49c0bbb2c7185d879a8a8121950b /drivers/input/joystick/adi.c | |
parent | 40b9b0b82e664bfdf26fd33014d52e23ff80b9f4 (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/adi.c')
-rw-r--r-- | drivers/input/joystick/adi.c | 7 |
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) | |||
290 | 290 | ||
291 | static int adi_open(struct input_dev *dev) | 291 | static int adi_open(struct input_dev *dev) |
292 | { | 292 | { |
293 | struct adi_port *port = dev->private; | 293 | struct adi_port *port = input_get_drvdata(dev); |
294 | 294 | ||
295 | gameport_start_polling(port->gameport); | 295 | gameport_start_polling(port->gameport); |
296 | return 0; | 296 | return 0; |
@@ -302,7 +302,7 @@ static int adi_open(struct input_dev *dev) | |||
302 | 302 | ||
303 | static void adi_close(struct input_dev *dev) | 303 | static void adi_close(struct input_dev *dev) |
304 | { | 304 | { |
305 | struct adi_port *port = dev->private; | 305 | struct adi_port *port = input_get_drvdata(dev); |
306 | 306 | ||
307 | gameport_stop_polling(port->gameport); | 307 | gameport_stop_polling(port->gameport); |
308 | } | 308 | } |
@@ -425,7 +425,8 @@ static int adi_init_input(struct adi *adi, struct adi_port *port, int half) | |||
425 | input_dev->id.product = adi->id; | 425 | input_dev->id.product = adi->id; |
426 | input_dev->id.version = 0x0100; | 426 | input_dev->id.version = 0x0100; |
427 | input_dev->cdev.dev = &port->gameport->dev; | 427 | input_dev->cdev.dev = &port->gameport->dev; |
428 | input_dev->private = port; | 428 | |
429 | input_set_drvdata(input_dev, port); | ||
429 | 430 | ||
430 | input_dev->open = adi_open; | 431 | input_dev->open = adi_open; |
431 | input_dev->close = adi_close; | 432 | input_dev->close = adi_close; |