aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/joystick/gamecon.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-07-22 11:46:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-07-22 11:46:15 -0700
commit27efd7e2e6d052e543425dba172d96f42704ef65 (patch)
treeb3c4bbb867b194750586cacff26c8455051ea259 /drivers/input/joystick/gamecon.c
parent84d4db0e22965334ae8272f324d31fb4657465aa (diff)
parent3619b8fead04ab9de643712e757ef6b5f79fd1ab (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics - relax capability ID checks on newer hardware Input: twl40300-keypad - fix handling of "all ground" rows Input: gamecon - reference correct pad in gc_psx_command() Input: gamecon - reference correct input device in NES mode Input: w90p910_keypad - change platfrom driver name to 'nuc900-kpi' Input: i8042 - add Gigabyte Spring Peak to dmi_noloop_table Input: qt2160 - rename kconfig symbol name
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 fbd62abb66f..0ffaf2c77a1 100644
--- 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 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) {
@@ -579,7 +578,7 @@ static void gc_psx_command(struct gc *gc, int b, unsigned char *data)
read = parport_read_status(port) ^ 0x80;
for (j = 0; j < GC_MAX_DEVICES; j++) {
- struct gc_pad *pad = &gc->pads[i];
+ struct gc_pad *pad = &gc->pads[j];
if (pad->type == GC_PSX || pad->type == GC_DDR)
data[j] |= (read & gc_status_bit[j]) ? (1 << i) : 0;