aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/adbhid.c
diff options
context:
space:
mode:
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);