aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/gamecon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/joystick/gamecon.c')
-rw-r--r--drivers/input/joystick/gamecon.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c
index fbd62abb66f9..0ffaf2c77a19 100644
--- a/drivers/input/joystick/gamecon.c
+++ b/drivers/input/joystick/gamecon.c
@@ -89,7 +89,6 @@ struct gc_pad {
89struct gc { 89struct 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) {
@@ -579,7 +578,7 @@ static void gc_psx_command(struct gc *gc, int b, unsigned char *data)
579 read = parport_read_status(port) ^ 0x80; 578 read = parport_read_status(port) ^ 0x80;
580 579
581 for (j = 0; j < GC_MAX_DEVICES; j++) { 580 for (j = 0; j < GC_MAX_DEVICES; j++) {
582 struct gc_pad *pad = &gc->pads[i]; 581 struct gc_pad *pad = &gc->pads[j];
583 582
584 if (pad->type == GC_PSX || pad->type == GC_DDR) 583 if (pad->type == GC_PSX || pad->type == GC_DDR)
585 data[j] |= (read & gc_status_bit[j]) ? (1 << i) : 0; 584 data[j] |= (read & gc_status_bit[j]) ? (1 << i) : 0;