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>
This commit is contained in:
Dmitry Torokhov 2010-07-20 20:25:35 -07:00
Родитель 1afaab90e8
Коммит 7b5d3312fb
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -89,7 +89,6 @@ struct gc_pad {
struct gc { struct gc {
struct pardevice *pd; struct pardevice *pd;
struct gc_pad pads[GC_MAX_DEVICES]; struct gc_pad pads[GC_MAX_DEVICES];
struct input_dev *dev[GC_MAX_DEVICES];
struct timer_list timer; struct timer_list timer;
int pad_count[GC_MAX]; int pad_count[GC_MAX];
int used; int used;
@ -387,7 +386,7 @@ static void gc_nes_process_packet(struct gc *gc)
for (i = 0; i < GC_MAX_DEVICES; i++) { for (i = 0; i < GC_MAX_DEVICES; i++) {
pad = &gc->pads[i]; pad = &gc->pads[i];
dev = gc->dev[i]; dev = pad->dev;
s = gc_status_bit[i]; s = gc_status_bit[i];
switch (pad->type) { switch (pad->type) {