[110/205] Input: gamecon - reference correct input device in NES mode

From: Greg KH
Date: Fri Jul 30 2010 - 14:21:56 EST


2.6.34-stable review patch. If anyone has any objections, please let us know.

------------------

From: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>

commit 7b5d3312fbfbb21d2fc7de94e0db66cfdf8b0055 upstream.

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.

Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/input/joystick/gamecon.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/input/joystick/gamecon.c
+++ b/drivers/input/joystick/gamecon.c
@@ -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;
@@ -387,7 +386,7 @@ static void gc_nes_process_packet(struct
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) {


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/