From: Dmitry Torokhov Date: Wed, 21 Jul 2010 03:25:35 +0000 (-0700) Subject: Input: gamecon - reference correct pad in gc_psx_command() X-Git-Tag: v2.6.35-rc6~1^2~2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c25f7b763cc35a249232ce612a36a811b0e263f9;p=pandora-kernel.git Input: gamecon - reference correct pad in gc_psx_command() 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 Cc: stable@kernel.org Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c index a79f70844108..0ffaf2c77a19 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;