aboutsummaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-07-20 20:25:35 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-02 10:29:53 -0700
commitac3c31b6403ec96ce21a92d13630c2fdf8fc0be7 (patch)
tree272953c2f58b8eb213e335bca3d2c9a81c68904c /drivers/input
parent590a040d36b9bb5aa1b2a59de1675670f2823330 (diff)
Input: gamecon - reference correct pad in gc_psx_command()
commit c25f7b763cc35a249232ce612a36a811b0e263f9 upstream. Otherwise we won't see any events from the gamepad. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16408 Reported-and-tested-by: Eugene Yudin <eugene.yudin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/joystick/gamecon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c
index a79f7084410..0ffaf2c77a1 100644
--- a/drivers/input/joystick/gamecon.c
+++ b/drivers/input/joystick/gamecon.c
@@ -578,7 +578,7 @@ static void gc_psx_command(struct gc *gc, int b, unsigned char *data)
read = parport_read_status(port) ^ 0x80;
for (j = 0; j < GC_MAX_DEVICES; j++) {
- struct gc_pad *pad = &gc->pads[i];
+ struct gc_pad *pad = &gc->pads[j];
if (pad->type == GC_PSX || pad->type == GC_DDR)
data[j] |= (read & gc_status_bit[j]) ? (1 << i) : 0;