diff options
Diffstat (limited to 'drivers/input/joystick/gamecon.c')
-rw-r--r-- | drivers/input/joystick/gamecon.c | 7 |
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 | ||
592 | static int gc_open(struct input_dev *dev) | 592 | static 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 | ||
611 | static void gc_close(struct input_dev *dev) | 611 | static 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; |