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:11 -0400 |
commit | 7b5d3312fbfbb21d2fc7de94e0db66cfdf8b0055 (patch) | |
tree | 29f2c92dea84554ab0cd73f57df2a4ca5bad476f /drivers/input/joystick/gamecon.c | |
parent | 1afaab90e8c0317170a53967064a934a77a59c16 (diff) |
Input: gamecon - reference correct input device in NES mode
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>
Diffstat (limited to 'drivers/input/joystick/gamecon.c')
-rw-r--r-- | drivers/input/joystick/gamecon.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c index fbd62abb66f9..a79f70844108 100644 --- a/drivers/input/joystick/gamecon.c +++ b/drivers/input/joystick/gamecon.c | |||
@@ -89,7 +89,6 @@ struct gc_pad { | |||
89 | struct gc { | 89 | struct gc { |
90 | struct pardevice *pd; | 90 | struct pardevice *pd; |
91 | struct gc_pad pads[GC_MAX_DEVICES]; | 91 | struct gc_pad pads[GC_MAX_DEVICES]; |
92 | struct input_dev *dev[GC_MAX_DEVICES]; | ||
93 | struct timer_list timer; | 92 | struct timer_list timer; |
94 | int pad_count[GC_MAX]; | 93 | int pad_count[GC_MAX]; |
95 | int used; | 94 | int used; |
@@ -387,7 +386,7 @@ static void gc_nes_process_packet(struct gc *gc) | |||
387 | for (i = 0; i < GC_MAX_DEVICES; i++) { | 386 | for (i = 0; i < GC_MAX_DEVICES; i++) { |
388 | 387 | ||
389 | pad = &gc->pads[i]; | 388 | pad = &gc->pads[i]; |
390 | dev = gc->dev[i]; | 389 | dev = pad->dev; |
391 | s = gc_status_bit[i]; | 390 | s = gc_status_bit[i]; |
392 | 391 | ||
393 | switch (pad->type) { | 392 | switch (pad->type) { |