diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-07-20 23:25:35 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-07-20 23:29:32 -0400 |
commit | c25f7b763cc35a249232ce612a36a811b0e263f9 (patch) | |
tree | b1993a5cefad38757f26a708223285f3e6174326 /drivers | |
parent | 7b5d3312fbfbb21d2fc7de94e0db66cfdf8b0055 (diff) |
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 <eugene.yudin@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/joystick/gamecon.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
578 | read = parport_read_status(port) ^ 0x80; | 578 | read = parport_read_status(port) ^ 0x80; |
579 | 579 | ||
580 | for (j = 0; j < GC_MAX_DEVICES; j++) { | 580 | for (j = 0; j < GC_MAX_DEVICES; j++) { |
581 | struct gc_pad *pad = &gc->pads[i]; | 581 | struct gc_pad *pad = &gc->pads[j]; |
582 | 582 | ||
583 | if (pad->type == GC_PSX || pad->type == GC_DDR) | 583 | if (pad->type == GC_PSX || pad->type == GC_DDR) |
584 | data[j] |= (read & gc_status_bit[j]) ? (1 << i) : 0; | 584 | data[j] |= (read & gc_status_bit[j]) ? (1 << i) : 0; |