diff options
Diffstat (limited to 'drivers/input/joystick/turbografx.c')
-rw-r--r-- | drivers/input/joystick/turbografx.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c index 0f2c60823b0b..8381c6f14373 100644 --- a/drivers/input/joystick/turbografx.c +++ b/drivers/input/joystick/turbografx.c | |||
@@ -48,16 +48,16 @@ MODULE_LICENSE("GPL"); | |||
48 | 48 | ||
49 | struct tgfx_config { | 49 | struct tgfx_config { |
50 | int args[TGFX_MAX_DEVICES + 1]; | 50 | int args[TGFX_MAX_DEVICES + 1]; |
51 | int nargs; | 51 | unsigned int nargs; |
52 | }; | 52 | }; |
53 | 53 | ||
54 | static struct tgfx_config tgfx[TGFX_MAX_PORTS] __initdata; | 54 | static struct tgfx_config tgfx_cfg[TGFX_MAX_PORTS] __initdata; |
55 | 55 | ||
56 | module_param_array_named(map, tgfx[0].args, int, &tgfx[0].nargs, 0); | 56 | module_param_array_named(map, tgfx_cfg[0].args, int, &tgfx_cfg[0].nargs, 0); |
57 | MODULE_PARM_DESC(map, "Describes first set of devices (<parport#>,<js1>,<js2>,..<js7>"); | 57 | MODULE_PARM_DESC(map, "Describes first set of devices (<parport#>,<js1>,<js2>,..<js7>"); |
58 | module_param_array_named(map2, tgfx[1].args, int, &tgfx[1].nargs, 0); | 58 | module_param_array_named(map2, tgfx_cfg[1].args, int, &tgfx_cfg[1].nargs, 0); |
59 | MODULE_PARM_DESC(map2, "Describes second set of devices"); | 59 | MODULE_PARM_DESC(map2, "Describes second set of devices"); |
60 | module_param_array_named(map3, tgfx[2].args, int, &tgfx[2].nargs, 0); | 60 | module_param_array_named(map3, tgfx_cfg[2].args, int, &tgfx_cfg[2].nargs, 0); |
61 | MODULE_PARM_DESC(map3, "Describes third set of devices"); | 61 | MODULE_PARM_DESC(map3, "Describes third set of devices"); |
62 | 62 | ||
63 | #define TGFX_REFRESH_TIME HZ/100 /* 10 ms */ | 63 | #define TGFX_REFRESH_TIME HZ/100 /* 10 ms */ |
@@ -283,16 +283,18 @@ static int __init tgfx_init(void) | |||
283 | int err = 0; | 283 | int err = 0; |
284 | 284 | ||
285 | for (i = 0; i < TGFX_MAX_PORTS; i++) { | 285 | for (i = 0; i < TGFX_MAX_PORTS; i++) { |
286 | if (tgfx[i].nargs == 0 || tgfx[i].args[0] < 0) | 286 | if (tgfx_cfg[i].nargs == 0 || tgfx_cfg[i].args[0] < 0) |
287 | continue; | 287 | continue; |
288 | 288 | ||
289 | if (tgfx[i].nargs < 2) { | 289 | if (tgfx_cfg[i].nargs < 2) { |
290 | printk(KERN_ERR "turbografx.c: at least one joystick must be specified\n"); | 290 | printk(KERN_ERR "turbografx.c: at least one joystick must be specified\n"); |
291 | err = -EINVAL; | 291 | err = -EINVAL; |
292 | break; | 292 | break; |
293 | } | 293 | } |
294 | 294 | ||
295 | tgfx_base[i] = tgfx_probe(tgfx[i].args[0], tgfx[i].args + 1, tgfx[i].nargs - 1); | 295 | tgfx_base[i] = tgfx_probe(tgfx_cfg[i].args[0], |
296 | tgfx_cfg[i].args + 1, | ||
297 | tgfx_cfg[i].nargs - 1); | ||
296 | if (IS_ERR(tgfx_base[i])) { | 298 | if (IS_ERR(tgfx_base[i])) { |
297 | err = PTR_ERR(tgfx_base[i]); | 299 | err = PTR_ERR(tgfx_base[i]); |
298 | break; | 300 | break; |