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/grip_mp.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/grip_mp.c')
-rw-r--r-- | drivers/input/joystick/grip_mp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/input/joystick/grip_mp.c b/drivers/input/joystick/grip_mp.c index 8120a9c4077..1771d5d8679 100644 --- a/drivers/input/joystick/grip_mp.c +++ b/drivers/input/joystick/grip_mp.c @@ -562,7 +562,7 @@ static void grip_poll(struct gameport *gameport) static int grip_open(struct input_dev *dev) { - struct grip_mp *grip = dev->private; + struct grip_mp *grip = input_get_drvdata(dev); gameport_start_polling(grip->gameport); return 0; @@ -574,9 +574,9 @@ static int grip_open(struct input_dev *dev) static void grip_close(struct input_dev *dev) { - struct grip_mp *grip = dev->private; + struct grip_mp *grip = input_get_drvdata(dev); - gameport_start_polling(grip->gameport); + gameport_stop_polling(grip->gameport); } /* @@ -600,7 +600,8 @@ static int register_slot(int slot, struct grip_mp *grip) input_dev->id.product = 0x0100 + port->mode; input_dev->id.version = 0x0100; input_dev->cdev.dev = &grip->gameport->dev; - input_dev->private = grip; + + input_set_drvdata(input_dev, grip); input_dev->open = grip_open; input_dev->close = grip_close; |