Skip to content

Commit

Permalink
Input: gamecon - reference correct input device in NES mode
Browse files Browse the repository at this point in the history
We moved input devices from 'struct gc' to individial pads (struct
gc-pad), but gc_nes_process_packet() was still trying to use old
ones and crashing.

Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Dmitry Torokhov committed Jul 21, 2010
1 parent 1afaab9 commit 7b5d331
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/input/joystick/gamecon.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ struct gc_pad {
struct gc {
struct pardevice *pd;
struct gc_pad pads[GC_MAX_DEVICES];
struct input_dev *dev[GC_MAX_DEVICES];
struct timer_list timer;
int pad_count[GC_MAX];
int used;
Expand Down Expand Up @@ -387,7 +386,7 @@ static void gc_nes_process_packet(struct gc *gc)
for (i = 0; i < GC_MAX_DEVICES; i++) {

pad = &gc->pads[i];
dev = gc->dev[i];
dev = pad->dev;
s = gc_status_bit[i];

switch (pad->type) {
Expand Down

0 comments on commit 7b5d331

Please sign in to comment.