aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/gamecon.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/gamecon.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/gamecon.c')
-rw-r--r--drivers/input/joystick/gamecon.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c
index 711e4b3e9e61..c71b58fe225d 100644
--- a/drivers/input/joystick/gamecon.c
+++ b/drivers/input/joystick/gamecon.c
@@ -591,7 +591,7 @@ static void gc_timer(unsigned long private)
591 591
592static int gc_open(struct input_dev *dev) 592static int gc_open(struct input_dev *dev)
593{ 593{
594 struct gc *gc = dev->private; 594 struct gc *gc = input_get_drvdata(dev);
595 int err; 595 int err;
596 596
597 err = mutex_lock_interruptible(&gc->mutex); 597 err = mutex_lock_interruptible(&gc->mutex);
@@ -610,7 +610,7 @@ static int gc_open(struct input_dev *dev)
610 610
611static void gc_close(struct input_dev *dev) 611static void gc_close(struct input_dev *dev)
612{ 612{
613 struct gc *gc = dev->private; 613 struct gc *gc = input_get_drvdata(dev);
614 614
615 mutex_lock(&gc->mutex); 615 mutex_lock(&gc->mutex);
616 if (!--gc->used) { 616 if (!--gc->used) {
@@ -646,7 +646,8 @@ static int __init gc_setup_pad(struct gc *gc, int idx, int pad_type)
646 input_dev->id.vendor = 0x0001; 646 input_dev->id.vendor = 0x0001;
647 input_dev->id.product = pad_type; 647 input_dev->id.product = pad_type;
648 input_dev->id.version = 0x0100; 648 input_dev->id.version = 0x0100;
649 input_dev->private = gc; 649
650 input_set_drvdata(input_dev, gc);
650 651
651 input_dev->open = gc_open; 652 input_dev->open = gc_open;
652 input_dev->close = gc_close; 653 input_dev->close = gc_close;