diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-10-19 02:40:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:42 -0400 |
commit | 7b19ada2ed3c1eccb9fe94d74b05e1428224663d (patch) | |
tree | a0c5975ce5236ff4023b92d431bd0a8fa321c6ce /drivers/input | |
parent | d05be13bcc6ec615fb2e9556a9b85d52800669b6 (diff) |
get rid of input BIT* duplicate defines
get rid of input BIT* duplicate defines
use newly global defined macros for input layer. Also remove includes of
input.h from non-input sources only for BIT macro definiton. Define the
macro temporarily in local manner, all those local definitons will be
removed further in this patchset (to not break bisecting).
BIT macro will be globally defined (1<<x)
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <dtor@mail.ru>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Cc: <lenb@kernel.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Cc: <perex@suse.cz>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: <vernux@us.ibm.com>
Cc: <malattia@linux.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/input')
85 files changed, 300 insertions, 234 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 1d62c8b88e12..e5b4e9bfbdc5 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -495,7 +495,7 @@ static unsigned int evdev_poll(struct file *file, poll_table *wait) | |||
495 | #ifdef CONFIG_COMPAT | 495 | #ifdef CONFIG_COMPAT |
496 | 496 | ||
497 | #define BITS_PER_LONG_COMPAT (sizeof(compat_long_t) * 8) | 497 | #define BITS_PER_LONG_COMPAT (sizeof(compat_long_t) * 8) |
498 | #define NBITS_COMPAT(x) ((((x) - 1) / BITS_PER_LONG_COMPAT) + 1) | 498 | #define BITS_TO_LONGS_COMPAT(x) ((((x) - 1) / BITS_PER_LONG_COMPAT) + 1) |
499 | 499 | ||
500 | #ifdef __BIG_ENDIAN | 500 | #ifdef __BIG_ENDIAN |
501 | static int bits_to_user(unsigned long *bits, unsigned int maxbit, | 501 | static int bits_to_user(unsigned long *bits, unsigned int maxbit, |
@@ -504,7 +504,7 @@ static int bits_to_user(unsigned long *bits, unsigned int maxbit, | |||
504 | int len, i; | 504 | int len, i; |
505 | 505 | ||
506 | if (compat) { | 506 | if (compat) { |
507 | len = NBITS_COMPAT(maxbit) * sizeof(compat_long_t); | 507 | len = BITS_TO_LONGS_COMPAT(maxbit) * sizeof(compat_long_t); |
508 | if (len > maxlen) | 508 | if (len > maxlen) |
509 | len = maxlen; | 509 | len = maxlen; |
510 | 510 | ||
@@ -515,7 +515,7 @@ static int bits_to_user(unsigned long *bits, unsigned int maxbit, | |||
515 | sizeof(compat_long_t))) | 515 | sizeof(compat_long_t))) |
516 | return -EFAULT; | 516 | return -EFAULT; |
517 | } else { | 517 | } else { |
518 | len = NBITS(maxbit) * sizeof(long); | 518 | len = BITS_TO_LONGS(maxbit) * sizeof(long); |
519 | if (len > maxlen) | 519 | if (len > maxlen) |
520 | len = maxlen; | 520 | len = maxlen; |
521 | 521 | ||
@@ -530,8 +530,8 @@ static int bits_to_user(unsigned long *bits, unsigned int maxbit, | |||
530 | unsigned int maxlen, void __user *p, int compat) | 530 | unsigned int maxlen, void __user *p, int compat) |
531 | { | 531 | { |
532 | int len = compat ? | 532 | int len = compat ? |
533 | NBITS_COMPAT(maxbit) * sizeof(compat_long_t) : | 533 | BITS_TO_LONGS_COMPAT(maxbit) * sizeof(compat_long_t) : |
534 | NBITS(maxbit) * sizeof(long); | 534 | BITS_TO_LONGS(maxbit) * sizeof(long); |
535 | 535 | ||
536 | if (len > maxlen) | 536 | if (len > maxlen) |
537 | len = maxlen; | 537 | len = maxlen; |
@@ -545,7 +545,7 @@ static int bits_to_user(unsigned long *bits, unsigned int maxbit, | |||
545 | static int bits_to_user(unsigned long *bits, unsigned int maxbit, | 545 | static int bits_to_user(unsigned long *bits, unsigned int maxbit, |
546 | unsigned int maxlen, void __user *p, int compat) | 546 | unsigned int maxlen, void __user *p, int compat) |
547 | { | 547 | { |
548 | int len = NBITS(maxbit) * sizeof(long); | 548 | int len = BITS_TO_LONGS(maxbit) * sizeof(long); |
549 | 549 | ||
550 | if (len > maxlen) | 550 | if (len > maxlen) |
551 | len = maxlen; | 551 | len = maxlen; |
diff --git a/drivers/input/input.c b/drivers/input/input.c index 2f2b020cd629..307c7b5c2b33 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -584,10 +584,10 @@ static int input_default_setkeycode(struct input_dev *dev, | |||
584 | 584 | ||
585 | 585 | ||
586 | #define MATCH_BIT(bit, max) \ | 586 | #define MATCH_BIT(bit, max) \ |
587 | for (i = 0; i < NBITS(max); i++) \ | 587 | for (i = 0; i < BITS_TO_LONGS(max); i++) \ |
588 | if ((id->bit[i] & dev->bit[i]) != id->bit[i]) \ | 588 | if ((id->bit[i] & dev->bit[i]) != id->bit[i]) \ |
589 | break; \ | 589 | break; \ |
590 | if (i != NBITS(max)) \ | 590 | if (i != BITS_TO_LONGS(max)) \ |
591 | continue; | 591 | continue; |
592 | 592 | ||
593 | static const struct input_device_id *input_match_device(const struct input_device_id *id, | 593 | static const struct input_device_id *input_match_device(const struct input_device_id *id, |
@@ -698,7 +698,7 @@ static void input_seq_print_bitmap(struct seq_file *seq, const char *name, | |||
698 | { | 698 | { |
699 | int i; | 699 | int i; |
700 | 700 | ||
701 | for (i = NBITS(max) - 1; i > 0; i--) | 701 | for (i = BITS_TO_LONGS(max) - 1; i > 0; i--) |
702 | if (bitmap[i]) | 702 | if (bitmap[i]) |
703 | break; | 703 | break; |
704 | 704 | ||
@@ -892,7 +892,7 @@ static int input_print_modalias_bits(char *buf, int size, | |||
892 | 892 | ||
893 | len += snprintf(buf, max(size, 0), "%c", name); | 893 | len += snprintf(buf, max(size, 0), "%c", name); |
894 | for (i = min_bit; i < max_bit; i++) | 894 | for (i = min_bit; i < max_bit; i++) |
895 | if (bm[LONG(i)] & BIT(i)) | 895 | if (bm[BIT_WORD(i)] & BIT_MASK(i)) |
896 | len += snprintf(buf + len, max(size - len, 0), "%X,", i); | 896 | len += snprintf(buf + len, max(size - len, 0), "%X,", i); |
897 | return len; | 897 | return len; |
898 | } | 898 | } |
@@ -991,7 +991,7 @@ static int input_print_bitmap(char *buf, int buf_size, unsigned long *bitmap, | |||
991 | int i; | 991 | int i; |
992 | int len = 0; | 992 | int len = 0; |
993 | 993 | ||
994 | for (i = NBITS(max) - 1; i > 0; i--) | 994 | for (i = BITS_TO_LONGS(max) - 1; i > 0; i--) |
995 | if (bitmap[i]) | 995 | if (bitmap[i]) |
996 | break; | 996 | break; |
997 | 997 | ||
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 2b201f9aa024..22b2789ef58a 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
@@ -844,8 +844,8 @@ static const struct input_device_id joydev_blacklist[] = { | |||
844 | { | 844 | { |
845 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | | 845 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | |
846 | INPUT_DEVICE_ID_MATCH_KEYBIT, | 846 | INPUT_DEVICE_ID_MATCH_KEYBIT, |
847 | .evbit = { BIT(EV_KEY) }, | 847 | .evbit = { BIT_MASK(EV_KEY) }, |
848 | .keybit = { [LONG(BTN_TOUCH)] = BIT(BTN_TOUCH) }, | 848 | .keybit = { [BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH) }, |
849 | }, /* Avoid itouchpads, touchscreens and tablets */ | 849 | }, /* Avoid itouchpads, touchscreens and tablets */ |
850 | { } /* Terminating entry */ | 850 | { } /* Terminating entry */ |
851 | }; | 851 | }; |
@@ -854,20 +854,20 @@ static const struct input_device_id joydev_ids[] = { | |||
854 | { | 854 | { |
855 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | | 855 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | |
856 | INPUT_DEVICE_ID_MATCH_ABSBIT, | 856 | INPUT_DEVICE_ID_MATCH_ABSBIT, |
857 | .evbit = { BIT(EV_ABS) }, | 857 | .evbit = { BIT_MASK(EV_ABS) }, |
858 | .absbit = { BIT(ABS_X) }, | 858 | .absbit = { BIT_MASK(ABS_X) }, |
859 | }, | 859 | }, |
860 | { | 860 | { |
861 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | | 861 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | |
862 | INPUT_DEVICE_ID_MATCH_ABSBIT, | 862 | INPUT_DEVICE_ID_MATCH_ABSBIT, |
863 | .evbit = { BIT(EV_ABS) }, | 863 | .evbit = { BIT_MASK(EV_ABS) }, |
864 | .absbit = { BIT(ABS_WHEEL) }, | 864 | .absbit = { BIT_MASK(ABS_WHEEL) }, |
865 | }, | 865 | }, |
866 | { | 866 | { |
867 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | | 867 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | |
868 | INPUT_DEVICE_ID_MATCH_ABSBIT, | 868 | INPUT_DEVICE_ID_MATCH_ABSBIT, |
869 | .evbit = { BIT(EV_ABS) }, | 869 | .evbit = { BIT_MASK(EV_ABS) }, |
870 | .absbit = { BIT(ABS_THROTTLE) }, | 870 | .absbit = { BIT_MASK(ABS_THROTTLE) }, |
871 | }, | 871 | }, |
872 | { } /* Terminating entry */ | 872 | { } /* Terminating entry */ |
873 | }; | 873 | }; |
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 | ||
67 | struct iforce_core_effect { | 67 | struct 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++) |
diff --git a/drivers/input/keyboard/aaed2000_kbd.c b/drivers/input/keyboard/aaed2000_kbd.c index 63d6ead6b877..72abc196ce66 100644 --- a/drivers/input/keyboard/aaed2000_kbd.c +++ b/drivers/input/keyboard/aaed2000_kbd.c | |||
@@ -125,7 +125,7 @@ static int __devinit aaedkbd_probe(struct platform_device *pdev) | |||
125 | input_dev->id.version = 0x0100; | 125 | input_dev->id.version = 0x0100; |
126 | input_dev->dev.parent = &pdev->dev; | 126 | input_dev->dev.parent = &pdev->dev; |
127 | 127 | ||
128 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); | 128 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); |
129 | input_dev->keycode = aaedkbd->keycode; | 129 | input_dev->keycode = aaedkbd->keycode; |
130 | input_dev->keycodesize = sizeof(unsigned char); | 130 | input_dev->keycodesize = sizeof(unsigned char); |
131 | input_dev->keycodemax = ARRAY_SIZE(aaedkbd_keycode); | 131 | input_dev->keycodemax = ARRAY_SIZE(aaedkbd_keycode); |
diff --git a/drivers/input/keyboard/amikbd.c b/drivers/input/keyboard/amikbd.c index c67e84ec2d6a..81bf7562aca0 100644 --- a/drivers/input/keyboard/amikbd.c +++ b/drivers/input/keyboard/amikbd.c | |||
@@ -209,7 +209,7 @@ static int __init amikbd_init(void) | |||
209 | amikbd_dev->id.product = 0x0001; | 209 | amikbd_dev->id.product = 0x0001; |
210 | amikbd_dev->id.version = 0x0100; | 210 | amikbd_dev->id.version = 0x0100; |
211 | 211 | ||
212 | amikbd_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); | 212 | amikbd_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); |
213 | 213 | ||
214 | for (i = 0; i < 0x78; i++) | 214 | for (i = 0; i < 0x78; i++) |
215 | set_bit(i, amikbd_dev->keybit); | 215 | set_bit(i, amikbd_dev->keybit); |
diff --git a/drivers/input/keyboard/atakbd.c b/drivers/input/keyboard/atakbd.c index a1800151b6ce..4e92100c56a8 100644 --- a/drivers/input/keyboard/atakbd.c +++ b/drivers/input/keyboard/atakbd.c | |||
@@ -237,7 +237,7 @@ static int __init atakbd_init(void) | |||
237 | atakbd_dev->id.product = 0x0001; | 237 | atakbd_dev->id.product = 0x0001; |
238 | atakbd_dev->id.version = 0x0100; | 238 | atakbd_dev->id.version = 0x0100; |
239 | 239 | ||
240 | atakbd_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); | 240 | atakbd_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); |
241 | atakbd_dev->keycode = atakbd_keycode; | 241 | atakbd_dev->keycode = atakbd_keycode; |
242 | atakbd_dev->keycodesize = sizeof(unsigned char); | 242 | atakbd_dev->keycodesize = sizeof(unsigned char); |
243 | atakbd_dev->keycodemax = ARRAY_SIZE(atakbd_keycode); | 243 | atakbd_dev->keycodemax = ARRAY_SIZE(atakbd_keycode); |
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 41fc3d03b6eb..b39c5b31e620 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -900,27 +900,32 @@ static void atkbd_set_device_attrs(struct atkbd *atkbd) | |||
900 | 900 | ||
901 | input_set_drvdata(input_dev, atkbd); | 901 | input_set_drvdata(input_dev, atkbd); |
902 | 902 | ||
903 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_MSC); | 903 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | |
904 | BIT_MASK(EV_MSC); | ||
904 | 905 | ||
905 | if (atkbd->write) { | 906 | if (atkbd->write) { |
906 | input_dev->evbit[0] |= BIT(EV_LED); | 907 | input_dev->evbit[0] |= BIT_MASK(EV_LED); |
907 | input_dev->ledbit[0] = BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL); | 908 | input_dev->ledbit[0] = BIT_MASK(LED_NUML) | |
909 | BIT_MASK(LED_CAPSL) | BIT_MASK(LED_SCROLLL); | ||
908 | } | 910 | } |
909 | 911 | ||
910 | if (atkbd->extra) | 912 | if (atkbd->extra) |
911 | input_dev->ledbit[0] |= BIT(LED_COMPOSE) | BIT(LED_SUSPEND) | | 913 | input_dev->ledbit[0] |= BIT_MASK(LED_COMPOSE) | |
912 | BIT(LED_SLEEP) | BIT(LED_MUTE) | BIT(LED_MISC); | 914 | BIT_MASK(LED_SUSPEND) | BIT_MASK(LED_SLEEP) | |
915 | BIT_MASK(LED_MUTE) | BIT_MASK(LED_MISC); | ||
913 | 916 | ||
914 | if (!atkbd->softrepeat) { | 917 | if (!atkbd->softrepeat) { |
915 | input_dev->rep[REP_DELAY] = 250; | 918 | input_dev->rep[REP_DELAY] = 250; |
916 | input_dev->rep[REP_PERIOD] = 33; | 919 | input_dev->rep[REP_PERIOD] = 33; |
917 | } | 920 | } |
918 | 921 | ||
919 | input_dev->mscbit[0] = atkbd->softraw ? BIT(MSC_SCAN) : BIT(MSC_RAW) | BIT(MSC_SCAN); | 922 | input_dev->mscbit[0] = atkbd->softraw ? BIT_MASK(MSC_SCAN) : |
923 | BIT_MASK(MSC_RAW) | BIT_MASK(MSC_SCAN); | ||
920 | 924 | ||
921 | if (atkbd->scroll) { | 925 | if (atkbd->scroll) { |
922 | input_dev->evbit[0] |= BIT(EV_REL); | 926 | input_dev->evbit[0] |= BIT_MASK(EV_REL); |
923 | input_dev->relbit[0] = BIT(REL_WHEEL) | BIT(REL_HWHEEL); | 927 | input_dev->relbit[0] = BIT_MASK(REL_WHEEL) | |
928 | BIT_MASK(REL_HWHEEL); | ||
924 | set_bit(BTN_MIDDLE, input_dev->keybit); | 929 | set_bit(BTN_MIDDLE, input_dev->keybit); |
925 | } | 930 | } |
926 | 931 | ||
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c index 6578bfff644b..790fed368aae 100644 --- a/drivers/input/keyboard/corgikbd.c +++ b/drivers/input/keyboard/corgikbd.c | |||
@@ -325,7 +325,8 @@ static int __init corgikbd_probe(struct platform_device *pdev) | |||
325 | input_dev->id.version = 0x0100; | 325 | input_dev->id.version = 0x0100; |
326 | input_dev->dev.parent = &pdev->dev; | 326 | input_dev->dev.parent = &pdev->dev; |
327 | 327 | ||
328 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_PWR) | BIT(EV_SW); | 328 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | |
329 | BIT_MASK(EV_PWR) | BIT_MASK(EV_SW); | ||
329 | input_dev->keycode = corgikbd->keycode; | 330 | input_dev->keycode = corgikbd->keycode; |
330 | input_dev->keycodesize = sizeof(unsigned char); | 331 | input_dev->keycodesize = sizeof(unsigned char); |
331 | input_dev->keycodemax = ARRAY_SIZE(corgikbd_keycode); | 332 | input_dev->keycodemax = ARRAY_SIZE(corgikbd_keycode); |
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index e2a3293bc67e..3eddf52a0bba 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c | |||
@@ -62,7 +62,7 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) | |||
62 | 62 | ||
63 | platform_set_drvdata(pdev, input); | 63 | platform_set_drvdata(pdev, input); |
64 | 64 | ||
65 | input->evbit[0] = BIT(EV_KEY); | 65 | input->evbit[0] = BIT_MASK(EV_KEY); |
66 | 66 | ||
67 | input->name = pdev->name; | 67 | input->name = pdev->name; |
68 | input->phys = "gpio-keys/input0"; | 68 | input->phys = "gpio-keys/input0"; |
diff --git a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c index cdd254f2e6c7..adbf29f0169d 100644 --- a/drivers/input/keyboard/hil_kbd.c +++ b/drivers/input/keyboard/hil_kbd.c | |||
@@ -323,8 +323,9 @@ static int hil_kbd_connect(struct serio *serio, struct serio_driver *drv) | |||
323 | goto bail2; | 323 | goto bail2; |
324 | } | 324 | } |
325 | 325 | ||
326 | kbd->dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); | 326 | kbd->dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); |
327 | kbd->dev->ledbit[0] = BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL); | 327 | kbd->dev->ledbit[0] = BIT_MASK(LED_NUML) | BIT_MASK(LED_CAPSL) | |
328 | BIT_MASK(LED_SCROLLL); | ||
328 | kbd->dev->keycodemax = HIL_KEYCODES_SET1_TBLSIZE; | 329 | kbd->dev->keycodemax = HIL_KEYCODES_SET1_TBLSIZE; |
329 | kbd->dev->keycodesize = sizeof(hil_kbd_set1[0]); | 330 | kbd->dev->keycodesize = sizeof(hil_kbd_set1[0]); |
330 | kbd->dev->keycode = hil_kbd_set1; | 331 | kbd->dev->keycode = hil_kbd_set1; |
diff --git a/drivers/input/keyboard/hilkbd.c b/drivers/input/keyboard/hilkbd.c index 499b6974457f..50d80ecf0b80 100644 --- a/drivers/input/keyboard/hilkbd.c +++ b/drivers/input/keyboard/hilkbd.c | |||
@@ -266,8 +266,9 @@ hil_keyb_init(void) | |||
266 | if (hphilkeyb_keycode[i] != KEY_RESERVED) | 266 | if (hphilkeyb_keycode[i] != KEY_RESERVED) |
267 | set_bit(hphilkeyb_keycode[i], hil_dev.dev->keybit); | 267 | set_bit(hphilkeyb_keycode[i], hil_dev.dev->keybit); |
268 | 268 | ||
269 | hil_dev.dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); | 269 | hil_dev.dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); |
270 | hil_dev.dev->ledbit[0] = BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL); | 270 | hil_dev.dev->ledbit[0] = BIT_MASK(LED_NUML) | BIT_MASK(LED_CAPSL) | |
271 | BIT_MASK(LED_SCROLLL); | ||
271 | hil_dev.dev->keycodemax = HIL_KEYCODES_SET1_TBLSIZE; | 272 | hil_dev.dev->keycodemax = HIL_KEYCODES_SET1_TBLSIZE; |
272 | hil_dev.dev->keycodesize= sizeof(hphilkeyb_keycode[0]); | 273 | hil_dev.dev->keycodesize= sizeof(hphilkeyb_keycode[0]); |
273 | hil_dev.dev->keycode = hphilkeyb_keycode; | 274 | hil_dev.dev->keycode = hphilkeyb_keycode; |
diff --git a/drivers/input/keyboard/locomokbd.c b/drivers/input/keyboard/locomokbd.c index 7a41b271f222..5a0ca18d6755 100644 --- a/drivers/input/keyboard/locomokbd.c +++ b/drivers/input/keyboard/locomokbd.c | |||
@@ -233,7 +233,7 @@ static int locomokbd_probe(struct locomo_dev *dev) | |||
233 | input_dev->id.version = 0x0100; | 233 | input_dev->id.version = 0x0100; |
234 | input_dev->dev.parent = &dev->dev; | 234 | input_dev->dev.parent = &dev->dev; |
235 | 235 | ||
236 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); | 236 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); |
237 | input_dev->keycode = locomokbd->keycode; | 237 | input_dev->keycode = locomokbd->keycode; |
238 | input_dev->keycodesize = sizeof(unsigned char); | 238 | input_dev->keycodesize = sizeof(unsigned char); |
239 | input_dev->keycodemax = ARRAY_SIZE(locomokbd_keycode); | 239 | input_dev->keycodemax = ARRAY_SIZE(locomokbd_keycode); |
diff --git a/drivers/input/keyboard/newtonkbd.c b/drivers/input/keyboard/newtonkbd.c index b97a41e3ee56..48d1cab0aa1c 100644 --- a/drivers/input/keyboard/newtonkbd.c +++ b/drivers/input/keyboard/newtonkbd.c | |||
@@ -106,7 +106,7 @@ static int nkbd_connect(struct serio *serio, struct serio_driver *drv) | |||
106 | input_dev->id.version = 0x0100; | 106 | input_dev->id.version = 0x0100; |
107 | input_dev->dev.parent = &serio->dev; | 107 | input_dev->dev.parent = &serio->dev; |
108 | 108 | ||
109 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); | 109 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); |
110 | input_dev->keycode = nkbd->keycode; | 110 | input_dev->keycode = nkbd->keycode; |
111 | input_dev->keycodesize = sizeof(unsigned char); | 111 | input_dev->keycodesize = sizeof(unsigned char); |
112 | input_dev->keycodemax = ARRAY_SIZE(nkbd_keycode); | 112 | input_dev->keycodemax = ARRAY_SIZE(nkbd_keycode); |
diff --git a/drivers/input/keyboard/pxa27x_keyboard.c b/drivers/input/keyboard/pxa27x_keyboard.c index b7061aa38816..bdd64ee4c5c8 100644 --- a/drivers/input/keyboard/pxa27x_keyboard.c +++ b/drivers/input/keyboard/pxa27x_keyboard.c | |||
@@ -183,8 +183,9 @@ static int __devinit pxakbd_probe(struct platform_device *pdev) | |||
183 | input_dev->close = pxakbd_close; | 183 | input_dev->close = pxakbd_close; |
184 | input_dev->dev.parent = &pdev->dev; | 184 | input_dev->dev.parent = &pdev->dev; |
185 | 185 | ||
186 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_REL); | 186 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | |
187 | input_dev->relbit[LONG(REL_WHEEL)] = BIT(REL_WHEEL); | 187 | BIT_MASK(EV_REL); |
188 | input_dev->relbit[BIT_WORD(REL_WHEEL)] = BIT_MASK(REL_WHEEL); | ||
188 | for (row = 0; row < pdata->nr_rows; row++) { | 189 | for (row = 0; row < pdata->nr_rows; row++) { |
189 | for (col = 0; col < pdata->nr_cols; col++) { | 190 | for (col = 0; col < pdata->nr_cols; col++) { |
190 | int code = pdata->keycodes[row][col]; | 191 | int code = pdata->keycodes[row][col]; |
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index 41b80385476c..410d78a774d0 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c | |||
@@ -381,7 +381,8 @@ static int __init spitzkbd_probe(struct platform_device *dev) | |||
381 | input_dev->id.product = 0x0001; | 381 | input_dev->id.product = 0x0001; |
382 | input_dev->id.version = 0x0100; | 382 | input_dev->id.version = 0x0100; |
383 | 383 | ||
384 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_PWR) | BIT(EV_SW); | 384 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | |
385 | BIT_MASK(EV_PWR) | BIT_MASK(EV_SW); | ||
385 | input_dev->keycode = spitzkbd->keycode; | 386 | input_dev->keycode = spitzkbd->keycode; |
386 | input_dev->keycodesize = sizeof(unsigned char); | 387 | input_dev->keycodesize = sizeof(unsigned char); |
387 | input_dev->keycodemax = ARRAY_SIZE(spitzkbd_keycode); | 388 | input_dev->keycodemax = ARRAY_SIZE(spitzkbd_keycode); |
diff --git a/drivers/input/keyboard/stowaway.c b/drivers/input/keyboard/stowaway.c index b44b0684d543..7437219370b1 100644 --- a/drivers/input/keyboard/stowaway.c +++ b/drivers/input/keyboard/stowaway.c | |||
@@ -110,7 +110,7 @@ static int skbd_connect(struct serio *serio, struct serio_driver *drv) | |||
110 | input_dev->id.version = 0x0100; | 110 | input_dev->id.version = 0x0100; |
111 | input_dev->dev.parent = &serio->dev; | 111 | input_dev->dev.parent = &serio->dev; |
112 | 112 | ||
113 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); | 113 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); |
114 | input_dev->keycode = skbd->keycode; | 114 | input_dev->keycode = skbd->keycode; |
115 | input_dev->keycodesize = sizeof(unsigned char); | 115 | input_dev->keycodesize = sizeof(unsigned char); |
116 | input_dev->keycodemax = ARRAY_SIZE(skbd_keycode); | 116 | input_dev->keycodemax = ARRAY_SIZE(skbd_keycode); |
diff --git a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c index 1d4e39624cfe..be0f5d19d023 100644 --- a/drivers/input/keyboard/sunkbd.c +++ b/drivers/input/keyboard/sunkbd.c | |||
@@ -277,9 +277,11 @@ static int sunkbd_connect(struct serio *serio, struct serio_driver *drv) | |||
277 | 277 | ||
278 | input_dev->event = sunkbd_event; | 278 | input_dev->event = sunkbd_event; |
279 | 279 | ||
280 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_SND) | BIT(EV_REP); | 280 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_LED) | |
281 | input_dev->ledbit[0] = BIT(LED_CAPSL) | BIT(LED_COMPOSE) | BIT(LED_SCROLLL) | BIT(LED_NUML); | 281 | BIT_MASK(EV_SND) | BIT_MASK(EV_REP); |
282 | input_dev->sndbit[0] = BIT(SND_CLICK) | BIT(SND_BELL); | 282 | input_dev->ledbit[0] = BIT_MASK(LED_CAPSL) | BIT_MASK(LED_COMPOSE) | |
283 | BIT_MASK(LED_SCROLLL) | BIT_MASK(LED_NUML); | ||
284 | input_dev->sndbit[0] = BIT_MASK(SND_CLICK) | BIT_MASK(SND_BELL); | ||
283 | 285 | ||
284 | input_dev->keycode = sunkbd->keycode; | 286 | input_dev->keycode = sunkbd->keycode; |
285 | input_dev->keycodesize = sizeof(unsigned char); | 287 | input_dev->keycodesize = sizeof(unsigned char); |
diff --git a/drivers/input/keyboard/xtkbd.c b/drivers/input/keyboard/xtkbd.c index f3a56eb58ed1..152a2c070508 100644 --- a/drivers/input/keyboard/xtkbd.c +++ b/drivers/input/keyboard/xtkbd.c | |||
@@ -110,7 +110,7 @@ static int xtkbd_connect(struct serio *serio, struct serio_driver *drv) | |||
110 | input_dev->id.version = 0x0100; | 110 | input_dev->id.version = 0x0100; |
111 | input_dev->dev.parent = &serio->dev; | 111 | input_dev->dev.parent = &serio->dev; |
112 | 112 | ||
113 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); | 113 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); |
114 | input_dev->keycode = xtkbd->keycode; | 114 | input_dev->keycode = xtkbd->keycode; |
115 | input_dev->keycodesize = sizeof(unsigned char); | 115 | input_dev->keycodesize = sizeof(unsigned char); |
116 | input_dev->keycodemax = ARRAY_SIZE(xtkbd_keycode); | 116 | input_dev->keycodemax = ARRAY_SIZE(xtkbd_keycode); |
diff --git a/drivers/input/misc/ati_remote.c b/drivers/input/misc/ati_remote.c index 471aab206443..3a7937481ad8 100644 --- a/drivers/input/misc/ati_remote.c +++ b/drivers/input/misc/ati_remote.c | |||
@@ -662,10 +662,10 @@ static void ati_remote_input_init(struct ati_remote *ati_remote) | |||
662 | struct input_dev *idev = ati_remote->idev; | 662 | struct input_dev *idev = ati_remote->idev; |
663 | int i; | 663 | int i; |
664 | 664 | ||
665 | idev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); | 665 | idev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); |
666 | idev->keybit[LONG(BTN_MOUSE)] = ( BIT(BTN_LEFT) | BIT(BTN_RIGHT) | | 666 | idev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) | |
667 | BIT(BTN_SIDE) | BIT(BTN_EXTRA) ); | 667 | BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_SIDE) | BIT_MASK(BTN_EXTRA); |
668 | idev->relbit[0] = BIT(REL_X) | BIT(REL_Y); | 668 | idev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); |
669 | for (i = 0; ati_remote_tbl[i].kind != KIND_END; i++) | 669 | for (i = 0; ati_remote_tbl[i].kind != KIND_END; i++) |
670 | if (ati_remote_tbl[i].type == EV_KEY) | 670 | if (ati_remote_tbl[i].type == EV_KEY) |
671 | set_bit(ati_remote_tbl[i].code, idev->keybit); | 671 | set_bit(ati_remote_tbl[i].code, idev->keybit); |
diff --git a/drivers/input/misc/ati_remote2.c b/drivers/input/misc/ati_remote2.c index 1031543e5c3f..f2709b82485c 100644 --- a/drivers/input/misc/ati_remote2.c +++ b/drivers/input/misc/ati_remote2.c | |||
@@ -346,9 +346,10 @@ static int ati_remote2_input_init(struct ati_remote2 *ar2) | |||
346 | ar2->idev = idev; | 346 | ar2->idev = idev; |
347 | input_set_drvdata(idev, ar2); | 347 | input_set_drvdata(idev, ar2); |
348 | 348 | ||
349 | idev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_REL); | 349 | idev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | BIT_MASK(EV_REL); |
350 | idev->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT); | 350 | idev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) | |
351 | idev->relbit[0] = BIT(REL_X) | BIT(REL_Y); | 351 | BIT_MASK(BTN_RIGHT); |
352 | idev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); | ||
352 | for (i = 0; ati_remote2_key_table[i].key_code != KEY_RESERVED; i++) | 353 | for (i = 0; ati_remote2_key_table[i].key_code != KEY_RESERVED; i++) |
353 | set_bit(ati_remote2_key_table[i].key_code, idev->keybit); | 354 | set_bit(ati_remote2_key_table[i].key_code, idev->keybit); |
354 | 355 | ||
diff --git a/drivers/input/misc/atlas_btns.c b/drivers/input/misc/atlas_btns.c index e43e92fd9e23..4e3ad657ed80 100644 --- a/drivers/input/misc/atlas_btns.c +++ b/drivers/input/misc/atlas_btns.c | |||
@@ -81,7 +81,7 @@ static int atlas_acpi_button_add(struct acpi_device *device) | |||
81 | input_dev->name = "Atlas ACPI button driver"; | 81 | input_dev->name = "Atlas ACPI button driver"; |
82 | input_dev->phys = "ASIM0000/atlas/input0"; | 82 | input_dev->phys = "ASIM0000/atlas/input0"; |
83 | input_dev->id.bustype = BUS_HOST; | 83 | input_dev->id.bustype = BUS_HOST; |
84 | input_dev->evbit[LONG(EV_KEY)] = BIT(EV_KEY); | 84 | input_dev->evbit[BIT_WORD(EV_KEY)] = BIT_MASK(EV_KEY); |
85 | 85 | ||
86 | set_bit(KEY_F1, input_dev->keybit); | 86 | set_bit(KEY_F1, input_dev->keybit); |
87 | set_bit(KEY_F2, input_dev->keybit); | 87 | set_bit(KEY_F2, input_dev->keybit); |
diff --git a/drivers/input/misc/cobalt_btns.c b/drivers/input/misc/cobalt_btns.c index 064b07936019..1aef97ed5e84 100644 --- a/drivers/input/misc/cobalt_btns.c +++ b/drivers/input/misc/cobalt_btns.c | |||
@@ -104,7 +104,7 @@ static int __devinit cobalt_buttons_probe(struct platform_device *pdev) | |||
104 | input->id.bustype = BUS_HOST; | 104 | input->id.bustype = BUS_HOST; |
105 | input->cdev.dev = &pdev->dev; | 105 | input->cdev.dev = &pdev->dev; |
106 | 106 | ||
107 | input->evbit[0] = BIT(EV_KEY); | 107 | input->evbit[0] = BIT_MASK(EV_KEY); |
108 | for (i = 0; i < ARRAY_SIZE(buttons_map); i++) { | 108 | for (i = 0; i < ARRAY_SIZE(buttons_map); i++) { |
109 | set_bit(buttons_map[i].keycode, input->keybit); | 109 | set_bit(buttons_map[i].keycode, input->keybit); |
110 | buttons_map[i].count = 0; | 110 | buttons_map[i].count = 0; |
diff --git a/drivers/input/misc/ixp4xx-beeper.c b/drivers/input/misc/ixp4xx-beeper.c index e759944041ab..d2ade7443b7d 100644 --- a/drivers/input/misc/ixp4xx-beeper.c +++ b/drivers/input/misc/ixp4xx-beeper.c | |||
@@ -109,8 +109,8 @@ static int __devinit ixp4xx_spkr_probe(struct platform_device *dev) | |||
109 | input_dev->id.version = 0x0100; | 109 | input_dev->id.version = 0x0100; |
110 | input_dev->dev.parent = &dev->dev; | 110 | input_dev->dev.parent = &dev->dev; |
111 | 111 | ||
112 | input_dev->evbit[0] = BIT(EV_SND); | 112 | input_dev->evbit[0] = BIT_MASK(EV_SND); |
113 | input_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE); | 113 | input_dev->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE); |
114 | input_dev->event = ixp4xx_spkr_event; | 114 | input_dev->event = ixp4xx_spkr_event; |
115 | 115 | ||
116 | err = request_irq(IRQ_IXP4XX_TIMER2, &ixp4xx_spkr_interrupt, | 116 | err = request_irq(IRQ_IXP4XX_TIMER2, &ixp4xx_spkr_interrupt, |
diff --git a/drivers/input/misc/keyspan_remote.c b/drivers/input/misc/keyspan_remote.c index 1bffc9fa98c2..fd74347047dd 100644 --- a/drivers/input/misc/keyspan_remote.c +++ b/drivers/input/misc/keyspan_remote.c | |||
@@ -497,7 +497,7 @@ static int keyspan_probe(struct usb_interface *interface, const struct usb_devic | |||
497 | usb_to_input_id(udev, &input_dev->id); | 497 | usb_to_input_id(udev, &input_dev->id); |
498 | input_dev->dev.parent = &interface->dev; | 498 | input_dev->dev.parent = &interface->dev; |
499 | 499 | ||
500 | input_dev->evbit[0] = BIT(EV_KEY); /* We will only report KEY events. */ | 500 | input_dev->evbit[0] = BIT_MASK(EV_KEY); /* We will only report KEY events. */ |
501 | for (i = 0; i < ARRAY_SIZE(keyspan_key_table); i++) | 501 | for (i = 0; i < ARRAY_SIZE(keyspan_key_table); i++) |
502 | if (keyspan_key_table[i] != KEY_RESERVED) | 502 | if (keyspan_key_table[i] != KEY_RESERVED) |
503 | set_bit(keyspan_key_table[i], input_dev->keybit); | 503 | set_bit(keyspan_key_table[i], input_dev->keybit); |
diff --git a/drivers/input/misc/m68kspkr.c b/drivers/input/misc/m68kspkr.c index e9f26e766b4d..0c64d9bb718e 100644 --- a/drivers/input/misc/m68kspkr.c +++ b/drivers/input/misc/m68kspkr.c | |||
@@ -65,8 +65,8 @@ static int __devinit m68kspkr_probe(struct platform_device *dev) | |||
65 | input_dev->id.version = 0x0100; | 65 | input_dev->id.version = 0x0100; |
66 | input_dev->dev.parent = &dev->dev; | 66 | input_dev->dev.parent = &dev->dev; |
67 | 67 | ||
68 | input_dev->evbit[0] = BIT(EV_SND); | 68 | input_dev->evbit[0] = BIT_MASK(EV_SND); |
69 | input_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE); | 69 | input_dev->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE); |
70 | input_dev->event = m68kspkr_event; | 70 | input_dev->event = m68kspkr_event; |
71 | 71 | ||
72 | err = input_register_device(input_dev); | 72 | err = input_register_device(input_dev); |
diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c index c19f77fbaf2a..4941a9e61e90 100644 --- a/drivers/input/misc/pcspkr.c +++ b/drivers/input/misc/pcspkr.c | |||
@@ -86,8 +86,8 @@ static int __devinit pcspkr_probe(struct platform_device *dev) | |||
86 | pcspkr_dev->id.version = 0x0100; | 86 | pcspkr_dev->id.version = 0x0100; |
87 | pcspkr_dev->dev.parent = &dev->dev; | 87 | pcspkr_dev->dev.parent = &dev->dev; |
88 | 88 | ||
89 | pcspkr_dev->evbit[0] = BIT(EV_SND); | 89 | pcspkr_dev->evbit[0] = BIT_MASK(EV_SND); |
90 | pcspkr_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE); | 90 | pcspkr_dev->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE); |
91 | pcspkr_dev->event = pcspkr_event; | 91 | pcspkr_dev->event = pcspkr_event; |
92 | 92 | ||
93 | err = input_register_device(pcspkr_dev); | 93 | err = input_register_device(pcspkr_dev); |
diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c index 448a470d28f2..7a7b8c7b9633 100644 --- a/drivers/input/misc/powermate.c +++ b/drivers/input/misc/powermate.c | |||
@@ -363,10 +363,11 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i | |||
363 | 363 | ||
364 | input_dev->event = powermate_input_event; | 364 | input_dev->event = powermate_input_event; |
365 | 365 | ||
366 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_MSC); | 366 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL) | |
367 | input_dev->keybit[LONG(BTN_0)] = BIT(BTN_0); | 367 | BIT_MASK(EV_MSC); |
368 | input_dev->relbit[LONG(REL_DIAL)] = BIT(REL_DIAL); | 368 | input_dev->keybit[BIT_WORD(BTN_0)] = BIT_MASK(BTN_0); |
369 | input_dev->mscbit[LONG(MSC_PULSELED)] = BIT(MSC_PULSELED); | 369 | input_dev->relbit[BIT_WORD(REL_DIAL)] = BIT_MASK(REL_DIAL); |
370 | input_dev->mscbit[BIT_WORD(MSC_PULSELED)] = BIT_MASK(MSC_PULSELED); | ||
370 | 371 | ||
371 | /* get a handle to the interrupt data pipe */ | 372 | /* get a handle to the interrupt data pipe */ |
372 | pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress); | 373 | pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress); |
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c index e36ec1d92be8..a3637d870880 100644 --- a/drivers/input/misc/sparcspkr.c +++ b/drivers/input/misc/sparcspkr.c | |||
@@ -115,8 +115,8 @@ static int __devinit sparcspkr_probe(struct device *dev) | |||
115 | input_dev->id.version = 0x0100; | 115 | input_dev->id.version = 0x0100; |
116 | input_dev->dev.parent = dev; | 116 | input_dev->dev.parent = dev; |
117 | 117 | ||
118 | input_dev->evbit[0] = BIT(EV_SND); | 118 | input_dev->evbit[0] = BIT_MASK(EV_SND); |
119 | input_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE); | 119 | input_dev->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE); |
120 | 120 | ||
121 | input_dev->event = state->event; | 121 | input_dev->event = state->event; |
122 | 122 | ||
diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c index ab15880fd566..46279ef2b649 100644 --- a/drivers/input/misc/yealink.c +++ b/drivers/input/misc/yealink.c | |||
@@ -945,7 +945,7 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
945 | /* input_dev->event = input_ev; TODO */ | 945 | /* input_dev->event = input_ev; TODO */ |
946 | 946 | ||
947 | /* register available key events */ | 947 | /* register available key events */ |
948 | input_dev->evbit[0] = BIT(EV_KEY); | 948 | input_dev->evbit[0] = BIT_MASK(EV_KEY); |
949 | for (i = 0; i < 256; i++) { | 949 | for (i = 0; i < 256; i++) { |
950 | int k = map_p1k_to_key(i); | 950 | int k = map_p1k_to_key(i); |
951 | if (k >= 0) { | 951 | if (k >= 0) { |
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 64d70a9b714c..2b5ed119c9a9 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -455,24 +455,25 @@ int alps_init(struct psmouse *psmouse) | |||
455 | if (alps_hw_init(psmouse, &version)) | 455 | if (alps_hw_init(psmouse, &version)) |
456 | goto init_fail; | 456 | goto init_fail; |
457 | 457 | ||
458 | dev1->evbit[LONG(EV_KEY)] |= BIT(EV_KEY); | 458 | dev1->evbit[BIT_WORD(EV_KEY)] |= BIT_MASK(EV_KEY); |
459 | dev1->keybit[LONG(BTN_TOUCH)] |= BIT(BTN_TOUCH); | 459 | dev1->keybit[BIT_WORD(BTN_TOUCH)] |= BIT_MASK(BTN_TOUCH); |
460 | dev1->keybit[LONG(BTN_TOOL_FINGER)] |= BIT(BTN_TOOL_FINGER); | 460 | dev1->keybit[BIT_WORD(BTN_TOOL_FINGER)] |= BIT_MASK(BTN_TOOL_FINGER); |
461 | dev1->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); | 461 | dev1->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_LEFT) | |
462 | BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT); | ||
462 | 463 | ||
463 | dev1->evbit[LONG(EV_ABS)] |= BIT(EV_ABS); | 464 | dev1->evbit[BIT_WORD(EV_ABS)] |= BIT_MASK(EV_ABS); |
464 | input_set_abs_params(dev1, ABS_X, 0, 1023, 0, 0); | 465 | input_set_abs_params(dev1, ABS_X, 0, 1023, 0, 0); |
465 | input_set_abs_params(dev1, ABS_Y, 0, 767, 0, 0); | 466 | input_set_abs_params(dev1, ABS_Y, 0, 767, 0, 0); |
466 | input_set_abs_params(dev1, ABS_PRESSURE, 0, 127, 0, 0); | 467 | input_set_abs_params(dev1, ABS_PRESSURE, 0, 127, 0, 0); |
467 | 468 | ||
468 | if (priv->i->flags & ALPS_WHEEL) { | 469 | if (priv->i->flags & ALPS_WHEEL) { |
469 | dev1->evbit[LONG(EV_REL)] |= BIT(EV_REL); | 470 | dev1->evbit[BIT_WORD(EV_REL)] |= BIT_MASK(EV_REL); |
470 | dev1->relbit[LONG(REL_WHEEL)] |= BIT(REL_WHEEL); | 471 | dev1->relbit[BIT_WORD(REL_WHEEL)] |= BIT_MASK(REL_WHEEL); |
471 | } | 472 | } |
472 | 473 | ||
473 | if (priv->i->flags & (ALPS_FW_BK_1 | ALPS_FW_BK_2)) { | 474 | if (priv->i->flags & (ALPS_FW_BK_1 | ALPS_FW_BK_2)) { |
474 | dev1->keybit[LONG(BTN_FORWARD)] |= BIT(BTN_FORWARD); | 475 | dev1->keybit[BIT_WORD(BTN_FORWARD)] |= BIT_MASK(BTN_FORWARD); |
475 | dev1->keybit[LONG(BTN_BACK)] |= BIT(BTN_BACK); | 476 | dev1->keybit[BIT_WORD(BTN_BACK)] |= BIT_MASK(BTN_BACK); |
476 | } | 477 | } |
477 | 478 | ||
478 | snprintf(priv->phys, sizeof(priv->phys), "%s/input1", psmouse->ps2dev.serio->phys); | 479 | snprintf(priv->phys, sizeof(priv->phys), "%s/input1", psmouse->ps2dev.serio->phys); |
@@ -483,9 +484,10 @@ int alps_init(struct psmouse *psmouse) | |||
483 | dev2->id.product = PSMOUSE_ALPS; | 484 | dev2->id.product = PSMOUSE_ALPS; |
484 | dev2->id.version = 0x0000; | 485 | dev2->id.version = 0x0000; |
485 | 486 | ||
486 | dev2->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); | 487 | dev2->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); |
487 | dev2->relbit[LONG(REL_X)] |= BIT(REL_X) | BIT(REL_Y); | 488 | dev2->relbit[BIT_WORD(REL_X)] |= BIT_MASK(REL_X) | BIT_MASK(REL_Y); |
488 | dev2->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); | 489 | dev2->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_LEFT) | |
490 | BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT); | ||
489 | 491 | ||
490 | if (input_register_device(priv->dev2)) | 492 | if (input_register_device(priv->dev2)) |
491 | goto init_fail; | 493 | goto init_fail; |
diff --git a/drivers/input/mouse/amimouse.c b/drivers/input/mouse/amimouse.c index 239a0e16d91a..a185ac78a42c 100644 --- a/drivers/input/mouse/amimouse.c +++ b/drivers/input/mouse/amimouse.c | |||
@@ -111,9 +111,10 @@ static int __init amimouse_init(void) | |||
111 | amimouse_dev->id.product = 0x0002; | 111 | amimouse_dev->id.product = 0x0002; |
112 | amimouse_dev->id.version = 0x0100; | 112 | amimouse_dev->id.version = 0x0100; |
113 | 113 | ||
114 | amimouse_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); | 114 | amimouse_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); |
115 | amimouse_dev->relbit[0] = BIT(REL_X) | BIT(REL_Y); | 115 | amimouse_dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); |
116 | amimouse_dev->keybit[LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); | 116 | amimouse_dev->keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) | |
117 | BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT); | ||
117 | amimouse_dev->open = amimouse_open; | 118 | amimouse_dev->open = amimouse_open; |
118 | amimouse_dev->close = amimouse_close; | 119 | amimouse_dev->close = amimouse_close; |
119 | 120 | ||
diff --git a/drivers/input/mouse/atarimouse.c b/drivers/input/mouse/atarimouse.c index c8c7244b48a1..98a3561d4b05 100644 --- a/drivers/input/mouse/atarimouse.c +++ b/drivers/input/mouse/atarimouse.c | |||
@@ -137,9 +137,10 @@ static int __init atamouse_init(void) | |||
137 | atamouse_dev->id.product = 0x0002; | 137 | atamouse_dev->id.product = 0x0002; |
138 | atamouse_dev->id.version = 0x0100; | 138 | atamouse_dev->id.version = 0x0100; |
139 | 139 | ||
140 | atamouse_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); | 140 | atamouse_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); |
141 | atamouse_dev->relbit[0] = BIT(REL_X) | BIT(REL_Y); | 141 | atamouse_dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); |
142 | atamouse_dev->keybit[LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); | 142 | atamouse_dev->keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) | |
143 | BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT); | ||
143 | atamouse_dev->open = atamouse_open; | 144 | atamouse_dev->open = atamouse_open; |
144 | atamouse_dev->close = atamouse_close; | 145 | atamouse_dev->close = atamouse_close; |
145 | 146 | ||
diff --git a/drivers/input/mouse/hil_ptr.c b/drivers/input/mouse/hil_ptr.c index 449bf4dcbbcc..27f88fbb7136 100644 --- a/drivers/input/mouse/hil_ptr.c +++ b/drivers/input/mouse/hil_ptr.c | |||
@@ -298,12 +298,12 @@ static int hil_ptr_connect(struct serio *serio, struct serio_driver *driver) | |||
298 | idd = ptr->idd + 1; | 298 | idd = ptr->idd + 1; |
299 | txt = "unknown"; | 299 | txt = "unknown"; |
300 | if ((did & HIL_IDD_DID_TYPE_MASK) == HIL_IDD_DID_TYPE_REL) { | 300 | if ((did & HIL_IDD_DID_TYPE_MASK) == HIL_IDD_DID_TYPE_REL) { |
301 | ptr->dev->evbit[0] = BIT(EV_REL); | 301 | ptr->dev->evbit[0] = BIT_MASK(EV_REL); |
302 | txt = "relative"; | 302 | txt = "relative"; |
303 | } | 303 | } |
304 | 304 | ||
305 | if ((did & HIL_IDD_DID_TYPE_MASK) == HIL_IDD_DID_TYPE_ABS) { | 305 | if ((did & HIL_IDD_DID_TYPE_MASK) == HIL_IDD_DID_TYPE_ABS) { |
306 | ptr->dev->evbit[0] = BIT(EV_ABS); | 306 | ptr->dev->evbit[0] = BIT_MASK(EV_ABS); |
307 | txt = "absolute"; | 307 | txt = "absolute"; |
308 | } | 308 | } |
309 | if (!ptr->dev->evbit[0]) | 309 | if (!ptr->dev->evbit[0]) |
@@ -311,7 +311,7 @@ static int hil_ptr_connect(struct serio *serio, struct serio_driver *driver) | |||
311 | 311 | ||
312 | ptr->nbtn = HIL_IDD_NUM_BUTTONS(idd); | 312 | ptr->nbtn = HIL_IDD_NUM_BUTTONS(idd); |
313 | if (ptr->nbtn) | 313 | if (ptr->nbtn) |
314 | ptr->dev->evbit[0] |= BIT(EV_KEY); | 314 | ptr->dev->evbit[0] |= BIT_MASK(EV_KEY); |
315 | 315 | ||
316 | naxsets = HIL_IDD_NUM_AXSETS(*idd); | 316 | naxsets = HIL_IDD_NUM_AXSETS(*idd); |
317 | ptr->naxes = HIL_IDD_NUM_AXES_PER_SET(*idd); | 317 | ptr->naxes = HIL_IDD_NUM_AXES_PER_SET(*idd); |
diff --git a/drivers/input/mouse/inport.c b/drivers/input/mouse/inport.c index 79b624fe8994..655a39217432 100644 --- a/drivers/input/mouse/inport.c +++ b/drivers/input/mouse/inport.c | |||
@@ -163,9 +163,10 @@ static int __init inport_init(void) | |||
163 | inport_dev->id.product = 0x0001; | 163 | inport_dev->id.product = 0x0001; |
164 | inport_dev->id.version = 0x0100; | 164 | inport_dev->id.version = 0x0100; |
165 | 165 | ||
166 | inport_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); | 166 | inport_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); |
167 | inport_dev->keybit[LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); | 167 | inport_dev->keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) | |
168 | inport_dev->relbit[0] = BIT(REL_X) | BIT(REL_Y); | 168 | BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT); |
169 | inport_dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); | ||
169 | 170 | ||
170 | inport_dev->open = inport_open; | 171 | inport_dev->open = inport_open; |
171 | inport_dev->close = inport_close; | 172 | inport_dev->close = inport_close; |
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c index d7de4c53b3d8..9ec57d80186e 100644 --- a/drivers/input/mouse/lifebook.c +++ b/drivers/input/mouse/lifebook.c | |||
@@ -270,9 +270,10 @@ static int lifebook_create_relative_device(struct psmouse *psmouse) | |||
270 | dev2->id.version = 0x0000; | 270 | dev2->id.version = 0x0000; |
271 | dev2->dev.parent = &psmouse->ps2dev.serio->dev; | 271 | dev2->dev.parent = &psmouse->ps2dev.serio->dev; |
272 | 272 | ||
273 | dev2->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); | 273 | dev2->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); |
274 | dev2->relbit[LONG(REL_X)] = BIT(REL_X) | BIT(REL_Y); | 274 | dev2->relbit[BIT_WORD(REL_X)] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); |
275 | dev2->keybit[LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT); | 275 | dev2->keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) | |
276 | BIT_MASK(BTN_RIGHT); | ||
276 | 277 | ||
277 | error = input_register_device(priv->dev2); | 278 | error = input_register_device(priv->dev2); |
278 | if (error) | 279 | if (error) |
@@ -295,9 +296,9 @@ int lifebook_init(struct psmouse *psmouse) | |||
295 | if (lifebook_absolute_mode(psmouse)) | 296 | if (lifebook_absolute_mode(psmouse)) |
296 | return -1; | 297 | return -1; |
297 | 298 | ||
298 | dev1->evbit[0] = BIT(EV_ABS) | BIT(EV_KEY); | 299 | dev1->evbit[0] = BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY); |
299 | dev1->relbit[0] = 0; | 300 | dev1->relbit[0] = 0; |
300 | dev1->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 301 | dev1->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
301 | input_set_abs_params(dev1, ABS_X, 0, max_coord, 0, 0); | 302 | input_set_abs_params(dev1, ABS_X, 0, max_coord, 0, 0); |
302 | input_set_abs_params(dev1, ABS_Y, 0, max_coord, 0, 0); | 303 | input_set_abs_params(dev1, ABS_Y, 0, max_coord, 0, 0); |
303 | 304 | ||
diff --git a/drivers/input/mouse/logibm.c b/drivers/input/mouse/logibm.c index 26c3b2e2ca94..b23a4f3ea5cd 100644 --- a/drivers/input/mouse/logibm.c +++ b/drivers/input/mouse/logibm.c | |||
@@ -156,9 +156,10 @@ static int __init logibm_init(void) | |||
156 | logibm_dev->id.product = 0x0001; | 156 | logibm_dev->id.product = 0x0001; |
157 | logibm_dev->id.version = 0x0100; | 157 | logibm_dev->id.version = 0x0100; |
158 | 158 | ||
159 | logibm_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); | 159 | logibm_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); |
160 | logibm_dev->keybit[LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); | 160 | logibm_dev->keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) | |
161 | logibm_dev->relbit[0] = BIT(REL_X) | BIT(REL_Y); | 161 | BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT); |
162 | logibm_dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); | ||
162 | 163 | ||
163 | logibm_dev->open = logibm_open; | 164 | logibm_dev->open = logibm_open; |
164 | logibm_dev->close = logibm_close; | 165 | logibm_dev->close = logibm_close; |
diff --git a/drivers/input/mouse/pc110pad.c b/drivers/input/mouse/pc110pad.c index 05d992e514f0..8991ab0b4fe3 100644 --- a/drivers/input/mouse/pc110pad.c +++ b/drivers/input/mouse/pc110pad.c | |||
@@ -144,9 +144,9 @@ static int __init pc110pad_init(void) | |||
144 | pc110pad_dev->id.product = 0x0001; | 144 | pc110pad_dev->id.product = 0x0001; |
145 | pc110pad_dev->id.version = 0x0100; | 145 | pc110pad_dev->id.version = 0x0100; |
146 | 146 | ||
147 | pc110pad_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 147 | pc110pad_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
148 | pc110pad_dev->absbit[0] = BIT(ABS_X) | BIT(ABS_Y); | 148 | pc110pad_dev->absbit[0] = BIT_MASK(ABS_X) | BIT_MASK(ABS_Y); |
149 | pc110pad_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 149 | pc110pad_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
150 | 150 | ||
151 | pc110pad_dev->absmax[ABS_X] = 0x1ff; | 151 | pc110pad_dev->absmax[ABS_X] = 0x1ff; |
152 | pc110pad_dev->absmax[ABS_Y] = 0x0ff; | 152 | pc110pad_dev->absmax[ABS_Y] = 0x0ff; |
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index 073525756532..da316d13d7f5 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
@@ -1115,9 +1115,10 @@ static int psmouse_switch_protocol(struct psmouse *psmouse, const struct psmouse | |||
1115 | 1115 | ||
1116 | input_dev->dev.parent = &psmouse->ps2dev.serio->dev; | 1116 | input_dev->dev.parent = &psmouse->ps2dev.serio->dev; |
1117 | 1117 | ||
1118 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); | 1118 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); |
1119 | input_dev->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); | 1119 | input_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) | |
1120 | input_dev->relbit[0] = BIT(REL_X) | BIT(REL_Y); | 1120 | BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT); |
1121 | input_dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); | ||
1121 | 1122 | ||
1122 | psmouse->set_rate = psmouse_set_rate; | 1123 | psmouse->set_rate = psmouse_set_rate; |
1123 | psmouse->set_resolution = psmouse_set_resolution; | 1124 | psmouse->set_resolution = psmouse_set_resolution; |
diff --git a/drivers/input/mouse/rpcmouse.c b/drivers/input/mouse/rpcmouse.c index 355efd0423e7..18a48636ba4a 100644 --- a/drivers/input/mouse/rpcmouse.c +++ b/drivers/input/mouse/rpcmouse.c | |||
@@ -78,9 +78,10 @@ static int __init rpcmouse_init(void) | |||
78 | rpcmouse_dev->id.product = 0x0001; | 78 | rpcmouse_dev->id.product = 0x0001; |
79 | rpcmouse_dev->id.version = 0x0100; | 79 | rpcmouse_dev->id.version = 0x0100; |
80 | 80 | ||
81 | rpcmouse_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); | 81 | rpcmouse_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); |
82 | rpcmouse_dev->keybit[LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); | 82 | rpcmouse_dev->keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) | |
83 | rpcmouse_dev->relbit[0] = BIT(REL_X) | BIT(REL_Y); | 83 | BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT); |
84 | rpcmouse_dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); | ||
84 | 85 | ||
85 | rpcmouse_lastx = (short) iomd_readl(IOMD_MOUSEX); | 86 | rpcmouse_lastx = (short) iomd_readl(IOMD_MOUSEX); |
86 | rpcmouse_lasty = (short) iomd_readl(IOMD_MOUSEY); | 87 | rpcmouse_lasty = (short) iomd_readl(IOMD_MOUSEY); |
diff --git a/drivers/input/mouse/sermouse.c b/drivers/input/mouse/sermouse.c index 77b8ee2b9651..ed917bfd086a 100644 --- a/drivers/input/mouse/sermouse.c +++ b/drivers/input/mouse/sermouse.c | |||
@@ -268,9 +268,10 @@ static int sermouse_connect(struct serio *serio, struct serio_driver *drv) | |||
268 | input_dev->id.version = 0x0100; | 268 | input_dev->id.version = 0x0100; |
269 | input_dev->dev.parent = &serio->dev; | 269 | input_dev->dev.parent = &serio->dev; |
270 | 270 | ||
271 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); | 271 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); |
272 | input_dev->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT); | 272 | input_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) | |
273 | input_dev->relbit[0] = BIT(REL_X) | BIT(REL_Y); | 273 | BIT_MASK(BTN_RIGHT); |
274 | input_dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); | ||
274 | 275 | ||
275 | if (c & 0x01) set_bit(BTN_MIDDLE, input_dev->keybit); | 276 | if (c & 0x01) set_bit(BTN_MIDDLE, input_dev->keybit); |
276 | if (c & 0x02) set_bit(BTN_SIDE, input_dev->keybit); | 277 | if (c & 0x02) set_bit(BTN_SIDE, input_dev->keybit); |
diff --git a/drivers/input/mouse/touchkit_ps2.c b/drivers/input/mouse/touchkit_ps2.c index 7b977fd23571..3fadb2accac0 100644 --- a/drivers/input/mouse/touchkit_ps2.c +++ b/drivers/input/mouse/touchkit_ps2.c | |||
@@ -85,7 +85,7 @@ int touchkit_ps2_detect(struct psmouse *psmouse, int set_properties) | |||
85 | return -ENODEV; | 85 | return -ENODEV; |
86 | 86 | ||
87 | if (set_properties) { | 87 | if (set_properties) { |
88 | dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 88 | dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
89 | set_bit(BTN_TOUCH, dev->keybit); | 89 | set_bit(BTN_TOUCH, dev->keybit); |
90 | input_set_abs_params(dev, ABS_X, 0, TOUCHKIT_MAX_XC, 0, 0); | 90 | input_set_abs_params(dev, ABS_X, 0, TOUCHKIT_MAX_XC, 0, 0); |
91 | input_set_abs_params(dev, ABS_Y, 0, TOUCHKIT_MAX_YC, 0, 0); | 91 | input_set_abs_params(dev, ABS_Y, 0, TOUCHKIT_MAX_YC, 0, 0); |
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 79146d6ed2ab..78c3ea75da2a 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c | |||
@@ -998,34 +998,36 @@ static const struct input_device_id mousedev_ids[] = { | |||
998 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | | 998 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | |
999 | INPUT_DEVICE_ID_MATCH_KEYBIT | | 999 | INPUT_DEVICE_ID_MATCH_KEYBIT | |
1000 | INPUT_DEVICE_ID_MATCH_RELBIT, | 1000 | INPUT_DEVICE_ID_MATCH_RELBIT, |
1001 | .evbit = { BIT(EV_KEY) | BIT(EV_REL) }, | 1001 | .evbit = { BIT_MASK(EV_KEY) | BIT_MASK(EV_REL) }, |
1002 | .keybit = { [LONG(BTN_LEFT)] = BIT(BTN_LEFT) }, | 1002 | .keybit = { [BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) }, |
1003 | .relbit = { BIT(REL_X) | BIT(REL_Y) }, | 1003 | .relbit = { BIT_MASK(REL_X) | BIT_MASK(REL_Y) }, |
1004 | }, /* A mouse like device, at least one button, | 1004 | }, /* A mouse like device, at least one button, |
1005 | two relative axes */ | 1005 | two relative axes */ |
1006 | { | 1006 | { |
1007 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | | 1007 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | |
1008 | INPUT_DEVICE_ID_MATCH_RELBIT, | 1008 | INPUT_DEVICE_ID_MATCH_RELBIT, |
1009 | .evbit = { BIT(EV_KEY) | BIT(EV_REL) }, | 1009 | .evbit = { BIT_MASK(EV_KEY) | BIT_MASK(EV_REL) }, |
1010 | .relbit = { BIT(REL_WHEEL) }, | 1010 | .relbit = { BIT_MASK(REL_WHEEL) }, |
1011 | }, /* A separate scrollwheel */ | 1011 | }, /* A separate scrollwheel */ |
1012 | { | 1012 | { |
1013 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | | 1013 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | |
1014 | INPUT_DEVICE_ID_MATCH_KEYBIT | | 1014 | INPUT_DEVICE_ID_MATCH_KEYBIT | |
1015 | INPUT_DEVICE_ID_MATCH_ABSBIT, | 1015 | INPUT_DEVICE_ID_MATCH_ABSBIT, |
1016 | .evbit = { BIT(EV_KEY) | BIT(EV_ABS) }, | 1016 | .evbit = { BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS) }, |
1017 | .keybit = { [LONG(BTN_TOUCH)] = BIT(BTN_TOUCH) }, | 1017 | .keybit = { [BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH) }, |
1018 | .absbit = { BIT(ABS_X) | BIT(ABS_Y) }, | 1018 | .absbit = { BIT_MASK(ABS_X) | BIT_MASK(ABS_Y) }, |
1019 | }, /* A tablet like device, at least touch detection, | 1019 | }, /* A tablet like device, at least touch detection, |
1020 | two absolute axes */ | 1020 | two absolute axes */ |
1021 | { | 1021 | { |
1022 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | | 1022 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | |
1023 | INPUT_DEVICE_ID_MATCH_KEYBIT | | 1023 | INPUT_DEVICE_ID_MATCH_KEYBIT | |
1024 | INPUT_DEVICE_ID_MATCH_ABSBIT, | 1024 | INPUT_DEVICE_ID_MATCH_ABSBIT, |
1025 | .evbit = { BIT(EV_KEY) | BIT(EV_ABS) }, | 1025 | .evbit = { BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS) }, |
1026 | .keybit = { [LONG(BTN_TOOL_FINGER)] = BIT(BTN_TOOL_FINGER) }, | 1026 | .keybit = { [BIT_WORD(BTN_TOOL_FINGER)] = |
1027 | .absbit = { BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE) | | 1027 | BIT_MASK(BTN_TOOL_FINGER) }, |
1028 | BIT(ABS_TOOL_WIDTH) }, | 1028 | .absbit = { BIT_MASK(ABS_X) | BIT_MASK(ABS_Y) | |
1029 | BIT_MASK(ABS_PRESSURE) | | ||
1030 | BIT_MASK(ABS_TOOL_WIDTH) }, | ||
1029 | }, /* A touchpad */ | 1031 | }, /* A touchpad */ |
1030 | 1032 | ||
1031 | { }, /* Terminating entry */ | 1033 | { }, /* Terminating entry */ |
diff --git a/drivers/input/serio/maceps2.c b/drivers/input/serio/maceps2.c index 558200e96d0f..5a41b8f7f888 100644 --- a/drivers/input/serio/maceps2.c +++ b/drivers/input/serio/maceps2.c | |||
@@ -31,6 +31,8 @@ MODULE_LICENSE("GPL"); | |||
31 | 31 | ||
32 | #define MACE_PS2_TIMEOUT 10000 /* in 50us unit */ | 32 | #define MACE_PS2_TIMEOUT 10000 /* in 50us unit */ |
33 | 33 | ||
34 | #define BIT(x) (1UL << (x)) | ||
35 | |||
34 | #define PS2_STATUS_CLOCK_SIGNAL BIT(0) /* external clock signal */ | 36 | #define PS2_STATUS_CLOCK_SIGNAL BIT(0) /* external clock signal */ |
35 | #define PS2_STATUS_CLOCK_INHIBIT BIT(1) /* clken output signal */ | 37 | #define PS2_STATUS_CLOCK_INHIBIT BIT(1) /* clken output signal */ |
36 | #define PS2_STATUS_TX_INPROGRESS BIT(2) /* transmission in progress */ | 38 | #define PS2_STATUS_TX_INPROGRESS BIT(2) /* transmission in progress */ |
diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c index dd2310458c46..b973d0ef6d16 100644 --- a/drivers/input/tablet/acecad.c +++ b/drivers/input/tablet/acecad.c | |||
@@ -192,10 +192,14 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_ | |||
192 | input_dev->open = usb_acecad_open; | 192 | input_dev->open = usb_acecad_open; |
193 | input_dev->close = usb_acecad_close; | 193 | input_dev->close = usb_acecad_close; |
194 | 194 | ||
195 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 195 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
196 | input_dev->absbit[0] = BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE); | 196 | input_dev->absbit[0] = BIT_MASK(ABS_X) | BIT_MASK(ABS_Y) | |
197 | input_dev->keybit[LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE); | 197 | BIT_MASK(ABS_PRESSURE); |
198 | input_dev->keybit[LONG(BTN_DIGI)] = BIT(BTN_TOOL_PEN) |BIT(BTN_TOUCH) | BIT(BTN_STYLUS) | BIT(BTN_STYLUS2); | 198 | input_dev->keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) | |
199 | BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE); | ||
200 | input_dev->keybit[BIT_WORD(BTN_DIGI)] = BIT_MASK(BTN_TOOL_PEN) | | ||
201 | BIT_MASK(BTN_TOUCH) | BIT_MASK(BTN_STYLUS) | | ||
202 | BIT_MASK(BTN_STYLUS2); | ||
199 | 203 | ||
200 | switch (id->driver_info) { | 204 | switch (id->driver_info) { |
201 | case 0: | 205 | case 0: |
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index b2ca10f2fe0e..d2c6da264722 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c | |||
@@ -573,10 +573,12 @@ static void gtco_setup_caps(struct input_dev *inputdev) | |||
573 | struct gtco *device = input_get_drvdata(inputdev); | 573 | struct gtco *device = input_get_drvdata(inputdev); |
574 | 574 | ||
575 | /* Which events */ | 575 | /* Which events */ |
576 | inputdev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_MSC); | 576 | inputdev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS) | |
577 | BIT_MASK(EV_MSC); | ||
577 | 578 | ||
578 | /* Misc event menu block */ | 579 | /* Misc event menu block */ |
579 | inputdev->mscbit[0] = BIT(MSC_SCAN)|BIT(MSC_SERIAL)|BIT(MSC_RAW) ; | 580 | inputdev->mscbit[0] = BIT_MASK(MSC_SCAN) | BIT_MASK(MSC_SERIAL) | |
581 | BIT_MASK(MSC_RAW); | ||
580 | 582 | ||
581 | /* Absolute values based on HID report info */ | 583 | /* Absolute values based on HID report info */ |
582 | input_set_abs_params(inputdev, ABS_X, device->min_X, device->max_X, | 584 | input_set_abs_params(inputdev, ABS_X, device->min_X, device->max_X, |
diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/tablet/kbtab.c index 91e6d00d4a43..1182fc133167 100644 --- a/drivers/input/tablet/kbtab.c +++ b/drivers/input/tablet/kbtab.c | |||
@@ -153,10 +153,13 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i | |||
153 | input_dev->open = kbtab_open; | 153 | input_dev->open = kbtab_open; |
154 | input_dev->close = kbtab_close; | 154 | input_dev->close = kbtab_close; |
155 | 155 | ||
156 | input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_MSC); | 156 | input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS) | |
157 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE); | 157 | BIT_MASK(EV_MSC); |
158 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH); | 158 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_LEFT) | |
159 | input_dev->mscbit[0] |= BIT(MSC_SERIAL); | 159 | BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE); |
160 | input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_PEN) | | ||
161 | BIT_MASK(BTN_TOUCH); | ||
162 | input_dev->mscbit[0] |= BIT_MASK(MSC_SERIAL); | ||
160 | input_set_abs_params(input_dev, ABS_X, 0, 0x2000, 4, 0); | 163 | input_set_abs_params(input_dev, ABS_X, 0, 0x2000, 4, 0); |
161 | input_set_abs_params(input_dev, ABS_Y, 0, 0x1750, 4, 0); | 164 | input_set_abs_params(input_dev, ABS_Y, 0, 0x1750, 4, 0); |
162 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, 0xff, 0, 0); | 165 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, 0xff, 0, 0); |
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 064e123c9b76..d64b1ea136b3 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -140,48 +140,58 @@ static void wacom_close(struct input_dev *dev) | |||
140 | 140 | ||
141 | void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 141 | void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
142 | { | 142 | { |
143 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5); | 143 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_1) | |
144 | BIT_MASK(BTN_5); | ||
144 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); | 145 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); |
145 | } | 146 | } |
146 | 147 | ||
147 | void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 148 | void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
148 | { | 149 | { |
149 | input_dev->evbit[0] |= BIT(EV_MSC); | 150 | input_dev->evbit[0] |= BIT_MASK(EV_MSC); |
150 | input_dev->mscbit[0] |= BIT(MSC_SERIAL); | 151 | input_dev->mscbit[0] |= BIT_MASK(MSC_SERIAL); |
151 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER); | 152 | input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_FINGER); |
152 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_4); | 153 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_0) | |
154 | BIT_MASK(BTN_4); | ||
153 | } | 155 | } |
154 | 156 | ||
155 | void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 157 | void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
156 | { | 158 | { |
157 | input_dev->evbit[0] |= BIT(EV_REL); | 159 | input_dev->evbit[0] |= BIT_MASK(EV_REL); |
158 | input_dev->relbit[0] |= BIT(REL_WHEEL); | 160 | input_dev->relbit[0] |= BIT_MASK(REL_WHEEL); |
159 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE); | 161 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_LEFT) | |
160 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_STYLUS2); | 162 | BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE); |
163 | input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_RUBBER) | | ||
164 | BIT_MASK(BTN_TOOL_MOUSE) | BIT_MASK(BTN_STYLUS2); | ||
161 | input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0); | 165 | input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0); |
162 | } | 166 | } |
163 | 167 | ||
164 | void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 168 | void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
165 | { | 169 | { |
166 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER); | 170 | input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_FINGER); |
167 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3); | 171 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_0) | |
172 | BIT_MASK(BTN_1) | BIT_MASK(BTN_2) | BIT_MASK(BTN_3); | ||
168 | input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); | 173 | input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); |
169 | } | 174 | } |
170 | 175 | ||
171 | void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 176 | void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
172 | { | 177 | { |
173 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7); | 178 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_4) | |
179 | BIT_MASK(BTN_5) | BIT_MASK(BTN_6) | BIT_MASK(BTN_7); | ||
174 | input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); | 180 | input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); |
175 | } | 181 | } |
176 | 182 | ||
177 | void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 183 | void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
178 | { | 184 | { |
179 | input_dev->evbit[0] |= BIT(EV_MSC) | BIT(EV_REL); | 185 | input_dev->evbit[0] |= BIT_MASK(EV_MSC) | BIT_MASK(EV_REL); |
180 | input_dev->mscbit[0] |= BIT(MSC_SERIAL); | 186 | input_dev->mscbit[0] |= BIT_MASK(MSC_SERIAL); |
181 | input_dev->relbit[0] |= BIT(REL_WHEEL); | 187 | input_dev->relbit[0] |= BIT_MASK(REL_WHEEL); |
182 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | BIT(BTN_SIDE) | BIT(BTN_EXTRA); | 188 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_LEFT) | |
183 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_TOOL_BRUSH) | 189 | BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE) | |
184 | | BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_LENS) | BIT(BTN_STYLUS2); | 190 | BIT_MASK(BTN_SIDE) | BIT_MASK(BTN_EXTRA); |
191 | input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_RUBBER) | | ||
192 | BIT_MASK(BTN_TOOL_MOUSE) | BIT_MASK(BTN_TOOL_BRUSH) | | ||
193 | BIT_MASK(BTN_TOOL_PENCIL) | BIT_MASK(BTN_TOOL_AIRBRUSH) | | ||
194 | BIT_MASK(BTN_TOOL_LENS) | BIT_MASK(BTN_STYLUS2); | ||
185 | input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0); | 195 | input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0); |
186 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 1023, 0, 0); | 196 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 1023, 0, 0); |
187 | input_set_abs_params(input_dev, ABS_TILT_X, 0, 127, 0, 0); | 197 | input_set_abs_params(input_dev, ABS_TILT_X, 0, 127, 0, 0); |
@@ -192,12 +202,13 @@ void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | |||
192 | 202 | ||
193 | void input_dev_pl(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 203 | void input_dev_pl(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
194 | { | 204 | { |
195 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_STYLUS2) | BIT(BTN_TOOL_RUBBER); | 205 | input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_STYLUS2) | |
206 | BIT_MASK(BTN_TOOL_RUBBER); | ||
196 | } | 207 | } |
197 | 208 | ||
198 | void input_dev_pt(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 209 | void input_dev_pt(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
199 | { | 210 | { |
200 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER); | 211 | input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_RUBBER); |
201 | } | 212 | } |
202 | 213 | ||
203 | static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *id) | 214 | static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *id) |
@@ -243,12 +254,13 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i | |||
243 | input_dev->open = wacom_open; | 254 | input_dev->open = wacom_open; |
244 | input_dev->close = wacom_close; | 255 | input_dev->close = wacom_close; |
245 | 256 | ||
246 | input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS); | 257 | input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
247 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); | 258 | input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_PEN) | |
259 | BIT_MASK(BTN_TOUCH) | BIT_MASK(BTN_STYLUS); | ||
248 | input_set_abs_params(input_dev, ABS_X, 0, wacom_wac->features->x_max, 4, 0); | 260 | input_set_abs_params(input_dev, ABS_X, 0, wacom_wac->features->x_max, 4, 0); |
249 | input_set_abs_params(input_dev, ABS_Y, 0, wacom_wac->features->y_max, 4, 0); | 261 | input_set_abs_params(input_dev, ABS_Y, 0, wacom_wac->features->y_max, 4, 0); |
250 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom_wac->features->pressure_max, 0, 0); | 262 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom_wac->features->pressure_max, 0, 0); |
251 | input_dev->absbit[LONG(ABS_MISC)] |= BIT(ABS_MISC); | 263 | input_dev->absbit[BIT_WORD(ABS_MISC)] |= BIT_MASK(ABS_MISC); |
252 | 264 | ||
253 | wacom_init_input_dev(input_dev, wacom_wac); | 265 | wacom_init_input_dev(input_dev, wacom_wac); |
254 | 266 | ||
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 51ae4fb7d123..f59aecf5ec15 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -917,8 +917,8 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
917 | input_dev->phys = ts->phys; | 917 | input_dev->phys = ts->phys; |
918 | input_dev->dev.parent = &spi->dev; | 918 | input_dev->dev.parent = &spi->dev; |
919 | 919 | ||
920 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 920 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
921 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 921 | input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
922 | input_set_abs_params(input_dev, ABS_X, | 922 | input_set_abs_params(input_dev, ABS_X, |
923 | pdata->x_min ? : 0, | 923 | pdata->x_min ? : 0, |
924 | pdata->x_max ? : MAX_12BIT, | 924 | pdata->x_max ? : MAX_12BIT, |
diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c index e6a31d118786..b1b2e07bf080 100644 --- a/drivers/input/touchscreen/corgi_ts.c +++ b/drivers/input/touchscreen/corgi_ts.c | |||
@@ -302,8 +302,8 @@ static int __init corgits_probe(struct platform_device *pdev) | |||
302 | input_dev->id.version = 0x0100; | 302 | input_dev->id.version = 0x0100; |
303 | input_dev->dev.parent = &pdev->dev; | 303 | input_dev->dev.parent = &pdev->dev; |
304 | 304 | ||
305 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 305 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
306 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 306 | input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
307 | input_set_abs_params(input_dev, ABS_X, X_AXIS_MIN, X_AXIS_MAX, 0, 0); | 307 | input_set_abs_params(input_dev, ABS_X, X_AXIS_MIN, X_AXIS_MAX, 0, 0); |
308 | input_set_abs_params(input_dev, ABS_Y, Y_AXIS_MIN, Y_AXIS_MAX, 0, 0); | 308 | input_set_abs_params(input_dev, ABS_Y, Y_AXIS_MIN, Y_AXIS_MAX, 0, 0); |
309 | input_set_abs_params(input_dev, ABS_PRESSURE, PRESSURE_MIN, PRESSURE_MAX, 0, 0); | 309 | input_set_abs_params(input_dev, ABS_PRESSURE, PRESSURE_MIN, PRESSURE_MAX, 0, 0); |
diff --git a/drivers/input/touchscreen/elo.c b/drivers/input/touchscreen/elo.c index 557d781719f1..d20689cdbd5d 100644 --- a/drivers/input/touchscreen/elo.c +++ b/drivers/input/touchscreen/elo.c | |||
@@ -320,8 +320,8 @@ static int elo_connect(struct serio *serio, struct serio_driver *drv) | |||
320 | input_dev->id.version = 0x0100; | 320 | input_dev->id.version = 0x0100; |
321 | input_dev->dev.parent = &serio->dev; | 321 | input_dev->dev.parent = &serio->dev; |
322 | 322 | ||
323 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 323 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
324 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 324 | input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
325 | 325 | ||
326 | serio_set_drvdata(serio, elo); | 326 | serio_set_drvdata(serio, elo); |
327 | err = serio_open(serio, drv); | 327 | err = serio_open(serio, drv); |
diff --git a/drivers/input/touchscreen/fujitsu_ts.c b/drivers/input/touchscreen/fujitsu_ts.c index daf7a4afc935..80b21800355f 100644 --- a/drivers/input/touchscreen/fujitsu_ts.c +++ b/drivers/input/touchscreen/fujitsu_ts.c | |||
@@ -122,8 +122,8 @@ static int fujitsu_connect(struct serio *serio, struct serio_driver *drv) | |||
122 | input_dev->id.vendor = SERIO_FUJITSU; | 122 | input_dev->id.vendor = SERIO_FUJITSU; |
123 | input_dev->id.product = 0; | 123 | input_dev->id.product = 0; |
124 | input_dev->id.version = 0x0100; | 124 | input_dev->id.version = 0x0100; |
125 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 125 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
126 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 126 | input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
127 | 127 | ||
128 | input_set_abs_params(input_dev, ABS_X, 0, 4096, 0, 0); | 128 | input_set_abs_params(input_dev, ABS_X, 0, 4096, 0, 0); |
129 | input_set_abs_params(input_dev, ABS_Y, 0, 4096, 0, 0); | 129 | input_set_abs_params(input_dev, ABS_Y, 0, 4096, 0, 0); |
diff --git a/drivers/input/touchscreen/gunze.c b/drivers/input/touchscreen/gunze.c index 39d602600d7c..a48a15868c4a 100644 --- a/drivers/input/touchscreen/gunze.c +++ b/drivers/input/touchscreen/gunze.c | |||
@@ -137,8 +137,8 @@ static int gunze_connect(struct serio *serio, struct serio_driver *drv) | |||
137 | input_dev->id.product = 0x0051; | 137 | input_dev->id.product = 0x0051; |
138 | input_dev->id.version = 0x0100; | 138 | input_dev->id.version = 0x0100; |
139 | input_dev->dev.parent = &serio->dev; | 139 | input_dev->dev.parent = &serio->dev; |
140 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 140 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
141 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 141 | input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
142 | input_set_abs_params(input_dev, ABS_X, 24, 1000, 0, 0); | 142 | input_set_abs_params(input_dev, ABS_X, 24, 1000, 0, 0); |
143 | input_set_abs_params(input_dev, ABS_Y, 24, 1000, 0, 0); | 143 | input_set_abs_params(input_dev, ABS_Y, 24, 1000, 0, 0); |
144 | 144 | ||
diff --git a/drivers/input/touchscreen/h3600_ts_input.c b/drivers/input/touchscreen/h3600_ts_input.c index 09ed7803cb8f..2ae6c6016a86 100644 --- a/drivers/input/touchscreen/h3600_ts_input.c +++ b/drivers/input/touchscreen/h3600_ts_input.c | |||
@@ -373,8 +373,9 @@ static int h3600ts_connect(struct serio *serio, struct serio_driver *drv) | |||
373 | 373 | ||
374 | input_dev->event = h3600ts_event; | 374 | input_dev->event = h3600ts_event; |
375 | 375 | ||
376 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_LED) | BIT(EV_PWR); | 376 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS) | |
377 | input_dev->ledbit[0] = BIT(LED_SLEEP); | 377 | BIT_MASK(EV_LED) | BIT_MASK(EV_PWR); |
378 | input_dev->ledbit[0] = BIT_MASK(LED_SLEEP); | ||
378 | input_set_abs_params(input_dev, ABS_X, 60, 985, 0, 0); | 379 | input_set_abs_params(input_dev, ABS_X, 60, 985, 0, 0); |
379 | input_set_abs_params(input_dev, ABS_Y, 35, 1024, 0, 0); | 380 | input_set_abs_params(input_dev, ABS_Y, 35, 1024, 0, 0); |
380 | 381 | ||
diff --git a/drivers/input/touchscreen/hp680_ts_input.c b/drivers/input/touchscreen/hp680_ts_input.c index 1a15475aedfc..c38d4e0f95c6 100644 --- a/drivers/input/touchscreen/hp680_ts_input.c +++ b/drivers/input/touchscreen/hp680_ts_input.c | |||
@@ -81,8 +81,8 @@ static int __init hp680_ts_init(void) | |||
81 | if (!hp680_ts_dev) | 81 | if (!hp680_ts_dev) |
82 | return -ENOMEM; | 82 | return -ENOMEM; |
83 | 83 | ||
84 | hp680_ts_dev->evbit[0] = BIT(EV_ABS) | BIT(EV_KEY); | 84 | hp680_ts_dev->evbit[0] = BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY); |
85 | hp680_ts_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 85 | hp680_ts_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
86 | 86 | ||
87 | input_set_abs_params(hp680_ts_dev, ABS_X, | 87 | input_set_abs_params(hp680_ts_dev, ABS_X, |
88 | HP680_TS_ABS_X_MIN, HP680_TS_ABS_X_MAX, 0, 0); | 88 | HP680_TS_ABS_X_MIN, HP680_TS_ABS_X_MAX, 0, 0); |
diff --git a/drivers/input/touchscreen/mk712.c b/drivers/input/touchscreen/mk712.c index 44140feeffc5..80a658868706 100644 --- a/drivers/input/touchscreen/mk712.c +++ b/drivers/input/touchscreen/mk712.c | |||
@@ -186,8 +186,8 @@ static int __init mk712_init(void) | |||
186 | mk712_dev->open = mk712_open; | 186 | mk712_dev->open = mk712_open; |
187 | mk712_dev->close = mk712_close; | 187 | mk712_dev->close = mk712_close; |
188 | 188 | ||
189 | mk712_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 189 | mk712_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
190 | mk712_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 190 | mk712_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
191 | input_set_abs_params(mk712_dev, ABS_X, 0, 0xfff, 88, 0); | 191 | input_set_abs_params(mk712_dev, ABS_X, 0, 0xfff, 88, 0); |
192 | input_set_abs_params(mk712_dev, ABS_Y, 0, 0xfff, 88, 0); | 192 | input_set_abs_params(mk712_dev, ABS_Y, 0, 0xfff, 88, 0); |
193 | 193 | ||
diff --git a/drivers/input/touchscreen/mtouch.c b/drivers/input/touchscreen/mtouch.c index 4ec3b1f940c8..9077228418b7 100644 --- a/drivers/input/touchscreen/mtouch.c +++ b/drivers/input/touchscreen/mtouch.c | |||
@@ -151,8 +151,8 @@ static int mtouch_connect(struct serio *serio, struct serio_driver *drv) | |||
151 | input_dev->id.product = 0; | 151 | input_dev->id.product = 0; |
152 | input_dev->id.version = 0x0100; | 152 | input_dev->id.version = 0x0100; |
153 | input_dev->dev.parent = &serio->dev; | 153 | input_dev->dev.parent = &serio->dev; |
154 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 154 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
155 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 155 | input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
156 | input_set_abs_params(mtouch->dev, ABS_X, MTOUCH_MIN_XC, MTOUCH_MAX_XC, 0, 0); | 156 | input_set_abs_params(mtouch->dev, ABS_X, MTOUCH_MIN_XC, MTOUCH_MAX_XC, 0, 0); |
157 | input_set_abs_params(mtouch->dev, ABS_Y, MTOUCH_MIN_YC, MTOUCH_MAX_YC, 0, 0); | 157 | input_set_abs_params(mtouch->dev, ABS_Y, MTOUCH_MIN_YC, MTOUCH_MAX_YC, 0, 0); |
158 | 158 | ||
diff --git a/drivers/input/touchscreen/penmount.c b/drivers/input/touchscreen/penmount.c index f2c0d3c7149c..c7f9cebebbb6 100644 --- a/drivers/input/touchscreen/penmount.c +++ b/drivers/input/touchscreen/penmount.c | |||
@@ -113,8 +113,8 @@ static int pm_connect(struct serio *serio, struct serio_driver *drv) | |||
113 | input_dev->id.version = 0x0100; | 113 | input_dev->id.version = 0x0100; |
114 | input_dev->dev.parent = &serio->dev; | 114 | input_dev->dev.parent = &serio->dev; |
115 | 115 | ||
116 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 116 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
117 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 117 | input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
118 | input_set_abs_params(pm->dev, ABS_X, 0, 0x3ff, 0, 0); | 118 | input_set_abs_params(pm->dev, ABS_X, 0, 0x3ff, 0, 0); |
119 | input_set_abs_params(pm->dev, ABS_Y, 0, 0x3ff, 0, 0); | 119 | input_set_abs_params(pm->dev, ABS_Y, 0, 0x3ff, 0, 0); |
120 | 120 | ||
diff --git a/drivers/input/touchscreen/touchright.c b/drivers/input/touchscreen/touchright.c index 3def7bb1df44..3a5c142c2a78 100644 --- a/drivers/input/touchscreen/touchright.c +++ b/drivers/input/touchscreen/touchright.c | |||
@@ -125,8 +125,8 @@ static int tr_connect(struct serio *serio, struct serio_driver *drv) | |||
125 | input_dev->id.product = 0; | 125 | input_dev->id.product = 0; |
126 | input_dev->id.version = 0x0100; | 126 | input_dev->id.version = 0x0100; |
127 | input_dev->dev.parent = &serio->dev; | 127 | input_dev->dev.parent = &serio->dev; |
128 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 128 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
129 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 129 | input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
130 | input_set_abs_params(tr->dev, ABS_X, TR_MIN_XC, TR_MAX_XC, 0, 0); | 130 | input_set_abs_params(tr->dev, ABS_X, TR_MIN_XC, TR_MAX_XC, 0, 0); |
131 | input_set_abs_params(tr->dev, ABS_Y, TR_MIN_YC, TR_MAX_YC, 0, 0); | 131 | input_set_abs_params(tr->dev, ABS_Y, TR_MIN_YC, TR_MAX_YC, 0, 0); |
132 | 132 | ||
diff --git a/drivers/input/touchscreen/touchwin.c b/drivers/input/touchscreen/touchwin.c index ac4bdcf18666..763a656a59f8 100644 --- a/drivers/input/touchscreen/touchwin.c +++ b/drivers/input/touchscreen/touchwin.c | |||
@@ -132,8 +132,8 @@ static int tw_connect(struct serio *serio, struct serio_driver *drv) | |||
132 | input_dev->id.product = 0; | 132 | input_dev->id.product = 0; |
133 | input_dev->id.version = 0x0100; | 133 | input_dev->id.version = 0x0100; |
134 | input_dev->dev.parent = &serio->dev; | 134 | input_dev->dev.parent = &serio->dev; |
135 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 135 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
136 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 136 | input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
137 | input_set_abs_params(tw->dev, ABS_X, TW_MIN_XC, TW_MAX_XC, 0, 0); | 137 | input_set_abs_params(tw->dev, ABS_X, TW_MIN_XC, TW_MAX_XC, 0, 0); |
138 | input_set_abs_params(tw->dev, ABS_Y, TW_MIN_YC, TW_MAX_YC, 0, 0); | 138 | input_set_abs_params(tw->dev, ABS_Y, TW_MIN_YC, TW_MAX_YC, 0, 0); |
139 | 139 | ||
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index 89373b01d8f5..7549939b9535 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c | |||
@@ -517,7 +517,7 @@ static int ucb1400_ts_probe(struct device *dev) | |||
517 | idev->id.product = id; | 517 | idev->id.product = id; |
518 | idev->open = ucb1400_ts_open; | 518 | idev->open = ucb1400_ts_open; |
519 | idev->close = ucb1400_ts_close; | 519 | idev->close = ucb1400_ts_close; |
520 | idev->evbit[0] = BIT(EV_ABS); | 520 | idev->evbit[0] = BIT_MASK(EV_ABS); |
521 | 521 | ||
522 | ucb1400_adc_enable(ucb); | 522 | ucb1400_adc_enable(ucb); |
523 | x_res = ucb1400_ts_read_xres(ucb); | 523 | x_res = ucb1400_ts_read_xres(ucb); |
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 9fb3d5c30999..5f34b78d5ddb 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c | |||
@@ -868,8 +868,8 @@ static int usbtouch_probe(struct usb_interface *intf, | |||
868 | input_dev->open = usbtouch_open; | 868 | input_dev->open = usbtouch_open; |
869 | input_dev->close = usbtouch_close; | 869 | input_dev->close = usbtouch_close; |
870 | 870 | ||
871 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 871 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
872 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 872 | input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
873 | input_set_abs_params(input_dev, ABS_X, type->min_xc, type->max_xc, 0, 0); | 873 | input_set_abs_params(input_dev, ABS_X, type->min_xc, type->max_xc, 0, 0); |
874 | input_set_abs_params(input_dev, ABS_Y, type->min_yc, type->max_yc, 0, 0); | 874 | input_set_abs_params(input_dev, ABS_Y, type->min_yc, type->max_yc, 0, 0); |
875 | if (type->max_press) | 875 | if (type->max_press) |