Skip to content

Commit

Permalink
Input: gamecon - reference correct pad in gc_psx_command()
Browse files Browse the repository at this point in the history
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>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
dtor committed Jul 21, 2010
1 parent 7b5d331 commit c25f7b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/joystick/gamecon.c
Expand Up @@ -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;
Expand Down

0 comments on commit c25f7b7

Please sign in to comment.