X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Finput%2Fjoystick%2Fdb9.c;h=c5c6115dc4c5c36ea59289c5049e85b4ed2fe6a8;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=f7d3eebd7d0f960e66dc00ca5ba1265a66de80a9;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c index f7d3eebd7..c5c6115dc 100644 --- a/drivers/input/joystick/db9.c +++ b/drivers/input/joystick/db9.c @@ -14,14 +14,14 @@ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -45,17 +45,17 @@ MODULE_LICENSE("GPL"); static int db9[] __initdata = { -1, 0 }; static int db9_nargs __initdata = 0; -module_param_array_named(dev, db9, int, db9_nargs, 0); +module_param_array_named(dev, db9, int, &db9_nargs, 0); MODULE_PARM_DESC(dev, "Describes first attached device (,)"); static int db9_2[] __initdata = { -1, 0 }; static int db9_nargs_2 __initdata = 0; -module_param_array_named(dev2, db9_2, int, db9_nargs_2, 0); +module_param_array_named(dev2, db9_2, int, &db9_nargs_2, 0); MODULE_PARM_DESC(dev2, "Describes second attached device (,)"); static int db9_3[] __initdata = { -1, 0 }; static int db9_nargs_3 __initdata = 0; -module_param_array_named(dev3, db9_3, int, db9_nargs_3, 0); +module_param_array_named(dev3, db9_3, int, &db9_nargs_3, 0); MODULE_PARM_DESC(dev3, "Describes third attached device (,)"); __obsolete_setup("db9="); @@ -95,7 +95,7 @@ __obsolete_setup("db9_3="); struct db9 { struct input_dev dev[DB9_MAX_DEVICES]; struct timer_list timer; - struct pardevice *pd; + struct pardevice *pd; int mode; int used; char phys[2][32]; @@ -188,7 +188,7 @@ static unsigned char db9_saturn_read_analog(struct parport *port, int type, int } /* - * db9_saturn_read_packet() reads whole saturn packet at connector + * db9_saturn_read_packet() reads whole saturn packet at connector * and returns device identifier code. */ static unsigned char db9_saturn_read_packet(struct parport *port, unsigned char *data, int type, int powered) @@ -481,16 +481,16 @@ static void db9_timer(unsigned long private) input_report_abs(dev, ABS_X, (data & DB9_RIGHT ? 0 : 1) - (data & DB9_LEFT ? 0 : 1)); input_report_abs(dev, ABS_Y, (data & DB9_DOWN ? 0 : 1) - (data & DB9_UP ? 0 : 1)); - parport_write_control(port, 0x0a); + parport_write_control(port, 0x0a); - for (i = 0; i < 7; i++) { + for (i = 0; i < 7; i++) { data = parport_read_data(port); - parport_write_control(port, 0x02); - parport_write_control(port, 0x0a); + parport_write_control(port, 0x02); + parport_write_control(port, 0x0a); input_report_key(dev, db9_cd32_btn[i], ~data & DB9_FIRE2); } - parport_write_control(port, 0x00); + parport_write_control(port, 0x00); break; } @@ -600,7 +600,7 @@ static struct db9 __init *db9_probe(int *config, int nargs) db9->dev[i].evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); for (j = 0; j < db9_buttons[db9->mode]; j++) - set_bit(db9_btn[db9->mode][j], db9->dev[i].keybit); + set_bit(db9_btn[db9->mode][j], db9->dev[i].keybit); for (j = 0; j < db9_num_axis[db9->mode]; j++) { set_bit(db9_abs[j], db9->dev[i].absbit); if (j < 2) { @@ -635,7 +635,7 @@ void __exit db9_exit(void) { int i, j; - for (i = 0; i < 3; i++) + for (i = 0; i < 3; i++) if (db9_base[i]) { for (j = 0; j < min(db9_max_pads[db9_base[i]->mode], DB9_MAX_DEVICES); j++) input_unregister_device(db9_base[i]->dev + j);