aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/adbhid.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-10-19 02:40:32 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:53:42 -0400
commit7b19ada2ed3c1eccb9fe94d74b05e1428224663d (patch)
treea0c5975ce5236ff4023b92d431bd0a8fa321c6ce /drivers/macintosh/adbhid.c
parentd05be13bcc6ec615fb2e9556a9b85d52800669b6 (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/macintosh/adbhid.c')
-rw-r--r--drivers/macintosh/adbhid.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c
index 2766e4fc4ea8..883da72b5368 100644
--- a/drivers/macintosh/adbhid.c
+++ b/drivers/macintosh/adbhid.c
@@ -791,8 +791,10 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
791 if (hid->keycode[i]) 791 if (hid->keycode[i])
792 set_bit(hid->keycode[i], input_dev->keybit); 792 set_bit(hid->keycode[i], input_dev->keybit);
793 793
794 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP); 794 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_LED) |
795 input_dev->ledbit[0] = BIT(LED_SCROLLL) | BIT(LED_CAPSL) | BIT(LED_NUML); 795 BIT_MASK(EV_REP);
796 input_dev->ledbit[0] = BIT_MASK(LED_SCROLLL) |
797 BIT_MASK(LED_CAPSL) | BIT_MASK(LED_NUML);
796 input_dev->event = adbhid_kbd_event; 798 input_dev->event = adbhid_kbd_event;
797 input_dev->keycodemax = KEY_FN; 799 input_dev->keycodemax = KEY_FN;
798 input_dev->keycodesize = sizeof(hid->keycode[0]); 800 input_dev->keycodesize = sizeof(hid->keycode[0]);
@@ -801,16 +803,18 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
801 case ADB_MOUSE: 803 case ADB_MOUSE:
802 sprintf(hid->name, "ADB mouse"); 804 sprintf(hid->name, "ADB mouse");
803 805
804 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); 806 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
805 input_dev->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); 807 input_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) |
806 input_dev->relbit[0] = BIT(REL_X) | BIT(REL_Y); 808 BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT);
809 input_dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y);
807 break; 810 break;
808 811
809 case ADB_MISC: 812 case ADB_MISC:
810 switch (original_handler_id) { 813 switch (original_handler_id) {
811 case 0x02: /* Adjustable keyboard button device */ 814 case 0x02: /* Adjustable keyboard button device */
812 sprintf(hid->name, "ADB adjustable keyboard buttons"); 815 sprintf(hid->name, "ADB adjustable keyboard buttons");
813 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); 816 input_dev->evbit[0] = BIT_MASK(EV_KEY) |
817 BIT_MASK(EV_REP);
814 set_bit(KEY_SOUND, input_dev->keybit); 818 set_bit(KEY_SOUND, input_dev->keybit);
815 set_bit(KEY_MUTE, input_dev->keybit); 819 set_bit(KEY_MUTE, input_dev->keybit);
816 set_bit(KEY_VOLUMEUP, input_dev->keybit); 820 set_bit(KEY_VOLUMEUP, input_dev->keybit);
@@ -818,7 +822,8 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
818 break; 822 break;
819 case 0x1f: /* Powerbook button device */ 823 case 0x1f: /* Powerbook button device */
820 sprintf(hid->name, "ADB Powerbook buttons"); 824 sprintf(hid->name, "ADB Powerbook buttons");
821 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); 825 input_dev->evbit[0] = BIT_MASK(EV_KEY) |
826 BIT_MASK(EV_REP);
822 set_bit(KEY_MUTE, input_dev->keybit); 827 set_bit(KEY_MUTE, input_dev->keybit);
823 set_bit(KEY_VOLUMEUP, input_dev->keybit); 828 set_bit(KEY_VOLUMEUP, input_dev->keybit);
824 set_bit(KEY_VOLUMEDOWN, input_dev->keybit); 829 set_bit(KEY_VOLUMEDOWN, input_dev->keybit);