From: Vojtech P. <vo...@us...> - 2002-01-03 08:55:09
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input In directory usw-pr-cvs1:/tmp/cvs-serv394/drivers/input Modified Files: a3d.c lightning.c pcigame.c Log Message: Fix a stupid bug in the gameport code. Caused crashes with pcigame.c. Index: a3d.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/a3d.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- a3d.c 2001/09/25 10:12:07 1.19 +++ a3d.c 2002/01/03 08:55:04 1.20 @@ -194,7 +194,7 @@ int a3d_adc_cooked_read(struct gameport *gameport, int *axes, int *buttons) { - struct a3d *a3d = gameport->private; + struct a3d *a3d = gameport->driver; int i; for (i = 0; i < 4; i++) axes[i] = (a3d->axes[i] < 254) ? a3d->axes[i] : -1; @@ -209,7 +209,7 @@ int a3d_adc_open(struct gameport *gameport, int mode) { - struct a3d *a3d = gameport->private; + struct a3d *a3d = gameport->driver; if (mode != GAMEPORT_MODE_COOKED) return -1; if (!a3d->used++) @@ -223,7 +223,7 @@ static void a3d_adc_close(struct gameport *gameport) { - struct a3d *a3d = gameport->private; + struct a3d *a3d = gameport->driver; if (!--a3d->used) del_timer(&a3d->timer); } @@ -329,7 +329,7 @@ a3d->dev.relbit[0] |= BIT(REL_X) | BIT(REL_Y); a3d->dev.keybit[LONG(BTN_MOUSE)] |= BIT(BTN_RIGHT) | BIT(BTN_LEFT) | BIT(BTN_MIDDLE); - a3d->adc.private = a3d; + a3d->adc.driver = a3d; a3d->adc.open = a3d_adc_open; a3d->adc.close = a3d_adc_close; a3d->adc.cooked_read = a3d_adc_cooked_read; Index: lightning.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/lightning.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- lightning.c 2001/09/25 10:12:07 1.18 +++ lightning.c 2002/01/03 08:55:04 1.19 @@ -79,7 +79,7 @@ static int l4_cooked_read(struct gameport *gameport, int *axes, int *buttons) { - struct l4 *l4 = gameport->private; + struct l4 *l4 = gameport->driver; unsigned char status; int i, result = -1; @@ -112,7 +112,7 @@ static int l4_open(struct gameport *gameport, int mode) { - struct l4 *l4 = gameport->private; + struct l4 *l4 = gameport->driver; if (l4->port != 0 && mode != GAMEPORT_MODE_COOKED) return -1; outb(L4_SELECT_ANALOG, L4_PORT); @@ -190,7 +190,7 @@ { int i, t; int cal[4]; - struct l4 *l4 = gameport->private; + struct l4 *l4 = gameport->driver; if (l4_getcal(l4->port, cal)) return -1; @@ -252,7 +252,7 @@ sprintf(l4->phys, "isa%04x/gameport%d", L4_PORT, 4 * i + j); gameport = &l4->gameport; - gameport->private = l4; + gameport->driver = l4; gameport->open = l4_open; gameport->cooked_read = l4_cooked_read; gameport->calibrate = l4_calibrate; Index: pcigame.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/pcigame.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- pcigame.c 2001/09/25 10:12:07 1.16 +++ pcigame.c 2002/01/03 08:55:04 1.17 @@ -79,19 +79,19 @@ static unsigned char pcigame_read(struct gameport *gameport) { - struct pcigame *pcigame = gameport->private; + struct pcigame *pcigame = gameport->driver; return readb(pcigame->base + pcigame->data->legacy); } static void pcigame_trigger(struct gameport *gameport) { - struct pcigame *pcigame = gameport->private; + struct pcigame *pcigame = gameport->driver; writeb(0xff, pcigame->base + pcigame->data->legacy); } static int pcigame_cooked_read(struct gameport *gameport, int *axes, int *buttons) { - struct pcigame *pcigame = gameport->private; + struct pcigame *pcigame = gameport->driver; int i; *buttons = (~readb(pcigame->base + pcigame->data->legacy) >> 4) & 0xf; @@ -106,7 +106,7 @@ static int pcigame_open(struct gameport *gameport, int mode) { - struct pcigame *pcigame = gameport->private; + struct pcigame *pcigame = gameport->driver; switch (mode) { case GAMEPORT_MODE_COOKED: @@ -139,7 +139,7 @@ dev->driver_data = pcigame; - pcigame->gameport.private = pcigame; + pcigame->gameport.driver = pcigame; pcigame->gameport.fuzz = 64; pcigame->gameport.read = pcigame_read; |