aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r--drivers/input/joystick/a3d.c28
-rw-r--r--drivers/input/joystick/adi.c2
-rw-r--r--drivers/input/joystick/amijoy.c7
-rw-r--r--drivers/input/joystick/analog.c2
-rw-r--r--drivers/input/joystick/cobra.c2
-rw-r--r--drivers/input/joystick/db9.c2
-rw-r--r--drivers/input/joystick/gamecon.c4
-rw-r--r--drivers/input/joystick/gf2k.c2
-rw-r--r--drivers/input/joystick/grip.c2
-rw-r--r--drivers/input/joystick/grip_mp.c2
-rw-r--r--drivers/input/joystick/guillemot.c2
-rw-r--r--drivers/input/joystick/iforce/iforce-main.c3
-rw-r--r--drivers/input/joystick/iforce/iforce.h4
-rw-r--r--drivers/input/joystick/interact.c2
-rw-r--r--drivers/input/joystick/magellan.c2
-rw-r--r--drivers/input/joystick/sidewinder.c2
-rw-r--r--drivers/input/joystick/spaceball.c17
-rw-r--r--drivers/input/joystick/spaceorb.c2
-rw-r--r--drivers/input/joystick/stinger.c9
-rw-r--r--drivers/input/joystick/tmdc.c2
-rw-r--r--drivers/input/joystick/turbografx.c2
-rw-r--r--drivers/input/joystick/twidjoy.c2
-rw-r--r--drivers/input/joystick/warrior.c8
-rw-r--r--drivers/input/joystick/xpad.c2
24 files changed, 64 insertions, 48 deletions
diff --git a/drivers/input/joystick/a3d.c b/drivers/input/joystick/a3d.c
index ff701ab10d74..52ba16f487c7 100644
--- a/drivers/input/joystick/a3d.c
+++ b/drivers/input/joystick/a3d.c
@@ -326,14 +326,19 @@ static int a3d_connect(struct gameport *gameport, struct gameport_driver *drv)
326 326
327 a3d->length = 33; 327 a3d->length = 33;
328 328
329 input_dev->evbit[0] |= BIT(EV_ABS) | BIT(EV_KEY) | BIT(EV_REL); 329 input_dev->evbit[0] |= BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY) |
330 input_dev->relbit[0] |= BIT(REL_X) | BIT(REL_Y); 330 BIT_MASK(EV_REL);
331 input_dev->absbit[0] |= BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_THROTTLE) | BIT(ABS_RUDDER) 331 input_dev->relbit[0] |= BIT_MASK(REL_X) | BIT_MASK(REL_Y);
332 | BIT(ABS_HAT0X) | BIT(ABS_HAT0Y) | BIT(ABS_HAT1X) | BIT(ABS_HAT1Y); 332 input_dev->absbit[0] |= BIT_MASK(ABS_X) | BIT_MASK(ABS_Y) |
333 input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_RIGHT) | BIT(BTN_LEFT) | BIT(BTN_MIDDLE) 333 BIT_MASK(ABS_THROTTLE) | BIT_MASK(ABS_RUDDER) |
334 | BIT(BTN_SIDE) | BIT(BTN_EXTRA); 334 BIT_MASK(ABS_HAT0X) | BIT_MASK(ABS_HAT0Y) |
335 input_dev->keybit[LONG(BTN_JOYSTICK)] |= BIT(BTN_TRIGGER) | BIT(BTN_THUMB) | BIT(BTN_TOP) 335 BIT_MASK(ABS_HAT1X) | BIT_MASK(ABS_HAT1Y);
336 | BIT(BTN_PINKIE); 336 input_dev->keybit[BIT_WORD(BTN_MOUSE)] |= BIT_MASK(BTN_RIGHT) |
337 BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_MIDDLE) |
338 BIT_MASK(BTN_SIDE) | BIT_MASK(BTN_EXTRA);
339 input_dev->keybit[BIT_WORD(BTN_JOYSTICK)] |=
340 BIT_MASK(BTN_TRIGGER) | BIT_MASK(BTN_THUMB) |
341 BIT_MASK(BTN_TOP) | BIT_MASK(BTN_PINKIE);
337 342
338 a3d_read(a3d, data); 343 a3d_read(a3d, data);
339 344
@@ -348,9 +353,10 @@ static int a3d_connect(struct gameport *gameport, struct gameport_driver *drv)
348 } else { 353 } else {
349 a3d->length = 29; 354 a3d->length = 29;
350 355
351 input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_REL); 356 input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
352 input_dev->relbit[0] |= BIT(REL_X) | BIT(REL_Y); 357 input_dev->relbit[0] |= BIT_MASK(REL_X) | BIT_MASK(REL_Y);
353 input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_RIGHT) | BIT(BTN_LEFT) | BIT(BTN_MIDDLE); 358 input_dev->keybit[BIT_WORD(BTN_MOUSE)] |= BIT_MASK(BTN_RIGHT) |
359 BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_MIDDLE);
354 360
355 a3d_read(a3d, data); 361 a3d_read(a3d, data);
356 362
diff --git a/drivers/input/joystick/adi.c b/drivers/input/joystick/adi.c
index 28140c4a110d..d1ca8a14950f 100644
--- a/drivers/input/joystick/adi.c
+++ b/drivers/input/joystick/adi.c
@@ -431,7 +431,7 @@ static int adi_init_input(struct adi *adi, struct adi_port *port, int half)
431 input_dev->open = adi_open; 431 input_dev->open = adi_open;
432 input_dev->close = adi_close; 432 input_dev->close = adi_close;
433 433
434 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 434 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
435 435
436 for (i = 0; i < adi->axes10 + adi->axes8 + (adi->hats + (adi->pad != -1)) * 2; i++) 436 for (i = 0; i < adi->axes10 + adi->axes8 + (adi->hats + (adi->pad != -1)) * 2; i++)
437 set_bit(adi->abs[i], input_dev->absbit); 437 set_bit(adi->abs[i], input_dev->absbit);
diff --git a/drivers/input/joystick/amijoy.c b/drivers/input/joystick/amijoy.c
index b0f5541ec3e6..5cf9f3610e67 100644
--- a/drivers/input/joystick/amijoy.c
+++ b/drivers/input/joystick/amijoy.c
@@ -137,9 +137,10 @@ static int __init amijoy_init(void)
137 amijoy_dev[i]->open = amijoy_open; 137 amijoy_dev[i]->open = amijoy_open;
138 amijoy_dev[i]->close = amijoy_close; 138 amijoy_dev[i]->close = amijoy_close;
139 139
140 amijoy_dev[i]->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 140 amijoy_dev[i]->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
141 amijoy_dev[i]->absbit[0] = BIT(ABS_X) | BIT(ABS_Y); 141 amijoy_dev[i]->absbit[0] = BIT_MASK(ABS_X) | BIT_MASK(ABS_Y);
142 amijoy_dev[i]->keybit[LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); 142 amijoy_dev[i]->keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) |
143 BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT);
143 for (j = 0; j < 2; j++) { 144 for (j = 0; j < 2; j++) {
144 amijoy_dev[i]->absmin[ABS_X + j] = -1; 145 amijoy_dev[i]->absmin[ABS_X + j] = -1;
145 amijoy_dev[i]->absmax[ABS_X + j] = 1; 146 amijoy_dev[i]->absmax[ABS_X + j] = 1;
diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c
index bdd157c1ebf8..15739880afc6 100644
--- a/drivers/input/joystick/analog.c
+++ b/drivers/input/joystick/analog.c
@@ -456,7 +456,7 @@ static int analog_init_device(struct analog_port *port, struct analog *analog, i
456 input_dev->open = analog_open; 456 input_dev->open = analog_open;
457 input_dev->close = analog_close; 457 input_dev->close = analog_close;
458 458
459 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 459 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
460 460
461 for (i = j = 0; i < 4; i++) 461 for (i = j = 0; i < 4; i++)
462 if (analog->mask & (1 << i)) { 462 if (analog->mask & (1 << i)) {
diff --git a/drivers/input/joystick/cobra.c b/drivers/input/joystick/cobra.c
index d3352a849b85..55646a6d89f5 100644
--- a/drivers/input/joystick/cobra.c
+++ b/drivers/input/joystick/cobra.c
@@ -218,7 +218,7 @@ static int cobra_connect(struct gameport *gameport, struct gameport_driver *drv)
218 input_dev->open = cobra_open; 218 input_dev->open = cobra_open;
219 input_dev->close = cobra_close; 219 input_dev->close = cobra_close;
220 220
221 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 221 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
222 input_set_abs_params(input_dev, ABS_X, -1, 1, 0, 0); 222 input_set_abs_params(input_dev, ABS_X, -1, 1, 0, 0);
223 input_set_abs_params(input_dev, ABS_Y, -1, 1, 0, 0); 223 input_set_abs_params(input_dev, ABS_Y, -1, 1, 0, 0);
224 for (j = 0; cobra_btn[j]; j++) 224 for (j = 0; cobra_btn[j]; j++)
diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c
index b069ee18e353..27fc475bd3a1 100644
--- a/drivers/input/joystick/db9.c
+++ b/drivers/input/joystick/db9.c
@@ -631,7 +631,7 @@ static struct db9 __init *db9_probe(int parport, int mode)
631 input_dev->open = db9_open; 631 input_dev->open = db9_open;
632 input_dev->close = db9_close; 632 input_dev->close = db9_close;
633 633
634 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 634 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
635 for (j = 0; j < db9_mode->n_buttons; j++) 635 for (j = 0; j < db9_mode->n_buttons; j++)
636 set_bit(db9_mode->buttons[j], input_dev->keybit); 636 set_bit(db9_mode->buttons[j], input_dev->keybit);
637 for (j = 0; j < db9_mode->n_axis; j++) { 637 for (j = 0; j < db9_mode->n_axis; j++) {
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c
index 1a452e0e5f25..df2a9d02ca6c 100644
--- a/drivers/input/joystick/gamecon.c
+++ b/drivers/input/joystick/gamecon.c
@@ -653,12 +653,12 @@ static int __init gc_setup_pad(struct gc *gc, int idx, int pad_type)
653 input_dev->close = gc_close; 653 input_dev->close = gc_close;
654 654
655 if (pad_type != GC_SNESMOUSE) { 655 if (pad_type != GC_SNESMOUSE) {
656 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 656 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
657 657
658 for (i = 0; i < 2; i++) 658 for (i = 0; i < 2; i++)
659 input_set_abs_params(input_dev, ABS_X + i, -1, 1, 0, 0); 659 input_set_abs_params(input_dev, ABS_X + i, -1, 1, 0, 0);
660 } else 660 } else
661 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); 661 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
662 662
663 gc->pads[0] |= gc_status_bit[idx]; 663 gc->pads[0] |= gc_status_bit[idx];
664 gc->pads[pad_type] |= gc_status_bit[idx]; 664 gc->pads[pad_type] |= gc_status_bit[idx];
diff --git a/drivers/input/joystick/gf2k.c b/drivers/input/joystick/gf2k.c
index d514aebf7554..1f6302c0eb3f 100644
--- a/drivers/input/joystick/gf2k.c
+++ b/drivers/input/joystick/gf2k.c
@@ -315,7 +315,7 @@ static int gf2k_connect(struct gameport *gameport, struct gameport_driver *drv)
315 input_dev->open = gf2k_open; 315 input_dev->open = gf2k_open;
316 input_dev->close = gf2k_close; 316 input_dev->close = gf2k_close;
317 317
318 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 318 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
319 319
320 for (i = 0; i < gf2k_axes[gf2k->id]; i++) 320 for (i = 0; i < gf2k_axes[gf2k->id]; i++)
321 set_bit(gf2k_abs[i], input_dev->absbit); 321 set_bit(gf2k_abs[i], input_dev->absbit);
diff --git a/drivers/input/joystick/grip.c b/drivers/input/joystick/grip.c
index 73eb5ab6f140..fd3853ab1aad 100644
--- a/drivers/input/joystick/grip.c
+++ b/drivers/input/joystick/grip.c
@@ -370,7 +370,7 @@ static int grip_connect(struct gameport *gameport, struct gameport_driver *drv)
370 input_dev->open = grip_open; 370 input_dev->open = grip_open;
371 input_dev->close = grip_close; 371 input_dev->close = grip_close;
372 372
373 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 373 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
374 374
375 for (j = 0; (t = grip_abs[grip->mode[i]][j]) >= 0; j++) { 375 for (j = 0; (t = grip_abs[grip->mode[i]][j]) >= 0; j++) {
376 376
diff --git a/drivers/input/joystick/grip_mp.c b/drivers/input/joystick/grip_mp.c
index 4ed3a3eadf19..c57e21d68c00 100644
--- a/drivers/input/joystick/grip_mp.c
+++ b/drivers/input/joystick/grip_mp.c
@@ -606,7 +606,7 @@ static int register_slot(int slot, struct grip_mp *grip)
606 input_dev->open = grip_open; 606 input_dev->open = grip_open;
607 input_dev->close = grip_close; 607 input_dev->close = grip_close;
608 608
609 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 609 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
610 610
611 for (j = 0; (t = grip_abs[port->mode][j]) >= 0; j++) 611 for (j = 0; (t = grip_abs[port->mode][j]) >= 0; j++)
612 input_set_abs_params(input_dev, t, -1, 1, 0, 0); 612 input_set_abs_params(input_dev, t, -1, 1, 0, 0);
diff --git a/drivers/input/joystick/guillemot.c b/drivers/input/joystick/guillemot.c
index d4e8073caf27..aa6bfb3fb8cd 100644
--- a/drivers/input/joystick/guillemot.c
+++ b/drivers/input/joystick/guillemot.c
@@ -238,7 +238,7 @@ static int guillemot_connect(struct gameport *gameport, struct gameport_driver *
238 input_dev->open = guillemot_open; 238 input_dev->open = guillemot_open;
239 input_dev->close = guillemot_close; 239 input_dev->close = guillemot_close;
240 240
241 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 241 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
242 242
243 for (i = 0; (t = guillemot->type->abs[i]) >= 0; i++) 243 for (i = 0; (t = guillemot->type->abs[i]) >= 0; i++)
244 input_set_abs_params(input_dev, t, 0, 255, 0, 0); 244 input_set_abs_params(input_dev, t, 0, 255, 0, 0);
diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c
index 682244b1c042..6f826b37d9aa 100644
--- a/drivers/input/joystick/iforce/iforce-main.c
+++ b/drivers/input/joystick/iforce/iforce-main.c
@@ -389,7 +389,8 @@ int iforce_init_device(struct iforce *iforce)
389 * Set input device bitfields and ranges. 389 * Set input device bitfields and ranges.
390 */ 390 */
391 391
392 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_FF_STATUS); 392 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS) |
393 BIT_MASK(EV_FF_STATUS);
393 394
394 for (i = 0; iforce->type->btn[i] >= 0; i++) 395 for (i = 0; iforce->type->btn[i] >= 0; i++)
395 set_bit(iforce->type->btn[i], input_dev->keybit); 396 set_bit(iforce->type->btn[i], input_dev->keybit);
diff --git a/drivers/input/joystick/iforce/iforce.h b/drivers/input/joystick/iforce/iforce.h
index 40a853ac21c7..a964a7cfd210 100644
--- a/drivers/input/joystick/iforce/iforce.h
+++ b/drivers/input/joystick/iforce/iforce.h
@@ -62,13 +62,13 @@
62#define FF_CORE_IS_PLAYED 3 /* Effect is currently being played */ 62#define FF_CORE_IS_PLAYED 3 /* Effect is currently being played */
63#define FF_CORE_SHOULD_PLAY 4 /* User wants the effect to be played */ 63#define FF_CORE_SHOULD_PLAY 4 /* User wants the effect to be played */
64#define FF_CORE_UPDATE 5 /* Effect is being updated */ 64#define FF_CORE_UPDATE 5 /* Effect is being updated */
65#define FF_MODCORE_MAX 5 65#define FF_MODCORE_CNT 6
66 66
67struct iforce_core_effect { 67struct iforce_core_effect {
68 /* Information about where modifiers are stored in the device's memory */ 68 /* Information about where modifiers are stored in the device's memory */
69 struct resource mod1_chunk; 69 struct resource mod1_chunk;
70 struct resource mod2_chunk; 70 struct resource mod2_chunk;
71 unsigned long flags[NBITS(FF_MODCORE_MAX)]; 71 unsigned long flags[BITS_TO_LONGS(FF_MODCORE_CNT)];
72}; 72};
73 73
74#define FF_CMD_EFFECT 0x010e 74#define FF_CMD_EFFECT 0x010e
diff --git a/drivers/input/joystick/interact.c b/drivers/input/joystick/interact.c
index 1aec1e9d7c59..bc8ea95dfd0e 100644
--- a/drivers/input/joystick/interact.c
+++ b/drivers/input/joystick/interact.c
@@ -269,7 +269,7 @@ static int interact_connect(struct gameport *gameport, struct gameport_driver *d
269 input_dev->open = interact_open; 269 input_dev->open = interact_open;
270 input_dev->close = interact_close; 270 input_dev->close = interact_close;
271 271
272 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 272 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
273 273
274 for (i = 0; (t = interact_type[interact->type].abs[i]) >= 0; i++) { 274 for (i = 0; (t = interact_type[interact->type].abs[i]) >= 0; i++) {
275 set_bit(t, input_dev->absbit); 275 set_bit(t, input_dev->absbit);
diff --git a/drivers/input/joystick/magellan.c b/drivers/input/joystick/magellan.c
index b35604ee43ae..54e676948ebb 100644
--- a/drivers/input/joystick/magellan.c
+++ b/drivers/input/joystick/magellan.c
@@ -170,7 +170,7 @@ static int magellan_connect(struct serio *serio, struct serio_driver *drv)
170 input_dev->id.version = 0x0100; 170 input_dev->id.version = 0x0100;
171 input_dev->dev.parent = &serio->dev; 171 input_dev->dev.parent = &serio->dev;
172 172
173 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 173 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
174 174
175 for (i = 0; i < 9; i++) 175 for (i = 0; i < 9; i++)
176 set_bit(magellan_buttons[i], input_dev->keybit); 176 set_bit(magellan_buttons[i], input_dev->keybit);
diff --git a/drivers/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c
index 2adf73f63c94..7b4865fdee54 100644
--- a/drivers/input/joystick/sidewinder.c
+++ b/drivers/input/joystick/sidewinder.c
@@ -758,7 +758,7 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv)
758 input_dev->open = sw_open; 758 input_dev->open = sw_open;
759 input_dev->close = sw_close; 759 input_dev->close = sw_close;
760 760
761 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 761 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
762 762
763 for (j = 0; (bits = sw_bit[sw->type][j]); j++) { 763 for (j = 0; (bits = sw_bit[sw->type][j]); j++) {
764 code = sw_abs[sw->type][j]; 764 code = sw_abs[sw->type][j];
diff --git a/drivers/input/joystick/spaceball.c b/drivers/input/joystick/spaceball.c
index abb7c4cf54ad..d4087fd49656 100644
--- a/drivers/input/joystick/spaceball.c
+++ b/drivers/input/joystick/spaceball.c
@@ -228,18 +228,23 @@ static int spaceball_connect(struct serio *serio, struct serio_driver *drv)
228 input_dev->id.version = 0x0100; 228 input_dev->id.version = 0x0100;
229 input_dev->dev.parent = &serio->dev; 229 input_dev->dev.parent = &serio->dev;
230 230
231 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 231 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
232 232
233 switch (id) { 233 switch (id) {
234 case SPACEBALL_4000FLX: 234 case SPACEBALL_4000FLX:
235 case SPACEBALL_4000FLX_L: 235 case SPACEBALL_4000FLX_L:
236 input_dev->keybit[LONG(BTN_0)] |= BIT(BTN_9); 236 input_dev->keybit[BIT_WORD(BTN_0)] |= BIT_MASK(BTN_9);
237 input_dev->keybit[LONG(BTN_A)] |= BIT(BTN_A) | BIT(BTN_B) | BIT(BTN_C) | BIT(BTN_MODE); 237 input_dev->keybit[BIT_WORD(BTN_A)] |= BIT_MASK(BTN_A) |
238 BIT_MASK(BTN_B) | BIT_MASK(BTN_C) |
239 BIT_MASK(BTN_MODE);
238 default: 240 default:
239 input_dev->keybit[LONG(BTN_0)] |= BIT(BTN_2) | BIT(BTN_3) | BIT(BTN_4) 241 input_dev->keybit[BIT_WORD(BTN_0)] |= BIT_MASK(BTN_2) |
240 | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7) | BIT(BTN_8); 242 BIT_MASK(BTN_3) | BIT_MASK(BTN_4) |
243 BIT_MASK(BTN_5) | BIT_MASK(BTN_6) |
244 BIT_MASK(BTN_7) | BIT_MASK(BTN_8);
241 case SPACEBALL_3003C: 245 case SPACEBALL_3003C:
242 input_dev->keybit[LONG(BTN_0)] |= BIT(BTN_1) | BIT(BTN_8); 246 input_dev->keybit[BIT_WORD(BTN_0)] |= BIT_MASK(BTN_1) |
247 BIT_MASK(BTN_8);
243 } 248 }
244 249
245 for (i = 0; i < 3; i++) { 250 for (i = 0; i < 3; i++) {
diff --git a/drivers/input/joystick/spaceorb.c b/drivers/input/joystick/spaceorb.c
index c4937f1e837c..f7ce4004f4ba 100644
--- a/drivers/input/joystick/spaceorb.c
+++ b/drivers/input/joystick/spaceorb.c
@@ -185,7 +185,7 @@ static int spaceorb_connect(struct serio *serio, struct serio_driver *drv)
185 input_dev->id.version = 0x0100; 185 input_dev->id.version = 0x0100;
186 input_dev->dev.parent = &serio->dev; 186 input_dev->dev.parent = &serio->dev;
187 187
188 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 188 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
189 189
190 for (i = 0; i < 6; i++) 190 for (i = 0; i < 6; i++)
191 set_bit(spaceorb_buttons[i], input_dev->keybit); 191 set_bit(spaceorb_buttons[i], input_dev->keybit);
diff --git a/drivers/input/joystick/stinger.c b/drivers/input/joystick/stinger.c
index 8581ee991d4e..baa10b2f7ba1 100644
--- a/drivers/input/joystick/stinger.c
+++ b/drivers/input/joystick/stinger.c
@@ -156,10 +156,11 @@ static int stinger_connect(struct serio *serio, struct serio_driver *drv)
156 input_dev->id.version = 0x0100; 156 input_dev->id.version = 0x0100;
157 input_dev->dev.parent = &serio->dev; 157 input_dev->dev.parent = &serio->dev;
158 158
159 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 159 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
160 input_dev->keybit[LONG(BTN_A)] = BIT(BTN_A) | BIT(BTN_B) | BIT(BTN_C) | BIT(BTN_X) | 160 input_dev->keybit[BIT_WORD(BTN_A)] = BIT_MASK(BTN_A) | BIT_MASK(BTN_B) |
161 BIT(BTN_Y) | BIT(BTN_Z) | BIT(BTN_TL) | BIT(BTN_TR) | 161 BIT_MASK(BTN_C) | BIT_MASK(BTN_X) | BIT_MASK(BTN_Y) |
162 BIT(BTN_START) | BIT(BTN_SELECT); 162 BIT_MASK(BTN_Z) | BIT_MASK(BTN_TL) | BIT_MASK(BTN_TR) |
163 BIT_MASK(BTN_START) | BIT_MASK(BTN_SELECT);
163 input_set_abs_params(input_dev, ABS_X, -64, 64, 0, 4); 164 input_set_abs_params(input_dev, ABS_X, -64, 64, 0, 4);
164 input_set_abs_params(input_dev, ABS_Y, -64, 64, 0, 4); 165 input_set_abs_params(input_dev, ABS_Y, -64, 64, 0, 4);
165 166
diff --git a/drivers/input/joystick/tmdc.c b/drivers/input/joystick/tmdc.c
index 3b36ee04f726..0feeb8acb532 100644
--- a/drivers/input/joystick/tmdc.c
+++ b/drivers/input/joystick/tmdc.c
@@ -333,7 +333,7 @@ static int tmdc_setup_port(struct tmdc *tmdc, int idx, unsigned char *data)
333 input_dev->open = tmdc_open; 333 input_dev->open = tmdc_open;
334 input_dev->close = tmdc_close; 334 input_dev->close = tmdc_close;
335 335
336 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 336 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
337 337
338 for (i = 0; i < port->absc && i < TMDC_ABS; i++) 338 for (i = 0; i < port->absc && i < TMDC_ABS; i++)
339 if (port->abs[i] >= 0) 339 if (port->abs[i] >= 0)
diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c
index 8381c6f14373..bbebd4e2ad7f 100644
--- a/drivers/input/joystick/turbografx.c
+++ b/drivers/input/joystick/turbografx.c
@@ -229,7 +229,7 @@ static struct tgfx __init *tgfx_probe(int parport, int *n_buttons, int n_devs)
229 input_dev->open = tgfx_open; 229 input_dev->open = tgfx_open;
230 input_dev->close = tgfx_close; 230 input_dev->close = tgfx_close;
231 231
232 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 232 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
233 input_set_abs_params(input_dev, ABS_X, -1, 1, 0, 0); 233 input_set_abs_params(input_dev, ABS_X, -1, 1, 0, 0);
234 input_set_abs_params(input_dev, ABS_Y, -1, 1, 0, 0); 234 input_set_abs_params(input_dev, ABS_Y, -1, 1, 0, 0);
235 235
diff --git a/drivers/input/joystick/twidjoy.c b/drivers/input/joystick/twidjoy.c
index c91504ec38eb..1085c841fec4 100644
--- a/drivers/input/joystick/twidjoy.c
+++ b/drivers/input/joystick/twidjoy.c
@@ -207,7 +207,7 @@ static int twidjoy_connect(struct serio *serio, struct serio_driver *drv)
207 input_dev->id.version = 0x0100; 207 input_dev->id.version = 0x0100;
208 input_dev->dev.parent = &serio->dev; 208 input_dev->dev.parent = &serio->dev;
209 209
210 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 210 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
211 input_set_abs_params(input_dev, ABS_X, -50, 50, 4, 4); 211 input_set_abs_params(input_dev, ABS_X, -50, 50, 4, 4);
212 input_set_abs_params(input_dev, ABS_Y, -50, 50, 4, 4); 212 input_set_abs_params(input_dev, ABS_Y, -50, 50, 4, 4);
213 213
diff --git a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c
index 4e85f72eefd7..e928b6e3724a 100644
--- a/drivers/input/joystick/warrior.c
+++ b/drivers/input/joystick/warrior.c
@@ -162,9 +162,11 @@ static int warrior_connect(struct serio *serio, struct serio_driver *drv)
162 input_dev->id.version = 0x0100; 162 input_dev->id.version = 0x0100;
163 input_dev->dev.parent = &serio->dev; 163 input_dev->dev.parent = &serio->dev;
164 164
165 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS); 165 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL) |
166 input_dev->keybit[LONG(BTN_TRIGGER)] = BIT(BTN_TRIGGER) | BIT(BTN_THUMB) | BIT(BTN_TOP) | BIT(BTN_TOP2); 166 BIT_MASK(EV_ABS);
167 input_dev->relbit[0] = BIT(REL_DIAL); 167 input_dev->keybit[BIT_WORD(BTN_TRIGGER)] = BIT_MASK(BTN_TRIGGER) |
168 BIT_MASK(BTN_THUMB) | BIT_MASK(BTN_TOP) | BIT_MASK(BTN_TOP2);
169 input_dev->relbit[0] = BIT_MASK(REL_DIAL);
168 input_set_abs_params(input_dev, ABS_X, -64, 64, 0, 8); 170 input_set_abs_params(input_dev, ABS_X, -64, 64, 0, 8);
169 input_set_abs_params(input_dev, ABS_Y, -64, 64, 0, 8); 171 input_set_abs_params(input_dev, ABS_Y, -64, 64, 0, 8);
170 input_set_abs_params(input_dev, ABS_THROTTLE, -112, 112, 0, 0); 172 input_set_abs_params(input_dev, ABS_THROTTLE, -112, 112, 0, 0);
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 623629a69b03..6dd375825a14 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -658,7 +658,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
658 input_dev->open = xpad_open; 658 input_dev->open = xpad_open;
659 input_dev->close = xpad_close; 659 input_dev->close = xpad_close;
660 660
661 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 661 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
662 662
663 /* set up buttons */ 663 /* set up buttons */
664 for (i = 0; xpad_btn[i] >= 0; i++) 664 for (i = 0; xpad_btn[i] >= 0; i++)