mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Cc: <[email protected]> Acked-by: Jiri Kosina <[email protected]> Cc: <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Cc: <[email protected]> Acked-by: Mauro Carvalho Chehab <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
d05be13bcc
commit
7b19ada2ed
110 changed files with 410 additions and 327 deletions
|
|
@ -791,8 +791,10 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
|
|||
if (hid->keycode[i])
|
||||
set_bit(hid->keycode[i], input_dev->keybit);
|
||||
|
||||
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP);
|
||||
input_dev->ledbit[0] = BIT(LED_SCROLLL) | BIT(LED_CAPSL) | BIT(LED_NUML);
|
||||
input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_LED) |
|
||||
BIT_MASK(EV_REP);
|
||||
input_dev->ledbit[0] = BIT_MASK(LED_SCROLLL) |
|
||||
BIT_MASK(LED_CAPSL) | BIT_MASK(LED_NUML);
|
||||
input_dev->event = adbhid_kbd_event;
|
||||
input_dev->keycodemax = KEY_FN;
|
||||
input_dev->keycodesize = sizeof(hid->keycode[0]);
|
||||
|
|
@ -801,16 +803,18 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
|
|||
case ADB_MOUSE:
|
||||
sprintf(hid->name, "ADB mouse");
|
||||
|
||||
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL);
|
||||
input_dev->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT);
|
||||
input_dev->relbit[0] = BIT(REL_X) | BIT(REL_Y);
|
||||
input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
|
||||
input_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) |
|
||||
BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT);
|
||||
input_dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y);
|
||||
break;
|
||||
|
||||
case ADB_MISC:
|
||||
switch (original_handler_id) {
|
||||
case 0x02: /* Adjustable keyboard button device */
|
||||
sprintf(hid->name, "ADB adjustable keyboard buttons");
|
||||
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
|
||||
input_dev->evbit[0] = BIT_MASK(EV_KEY) |
|
||||
BIT_MASK(EV_REP);
|
||||
set_bit(KEY_SOUND, input_dev->keybit);
|
||||
set_bit(KEY_MUTE, input_dev->keybit);
|
||||
set_bit(KEY_VOLUMEUP, input_dev->keybit);
|
||||
|
|
@ -818,7 +822,8 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
|
|||
break;
|
||||
case 0x1f: /* Powerbook button device */
|
||||
sprintf(hid->name, "ADB Powerbook buttons");
|
||||
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
|
||||
input_dev->evbit[0] = BIT_MASK(EV_KEY) |
|
||||
BIT_MASK(EV_REP);
|
||||
set_bit(KEY_MUTE, input_dev->keybit);
|
||||
set_bit(KEY_VOLUMEUP, input_dev->keybit);
|
||||
set_bit(KEY_VOLUMEDOWN, input_dev->keybit);
|
||||
|
|
|
|||
|
|
@ -117,9 +117,10 @@ static int emumousebtn_input_register(void)
|
|||
emumousebtn->id.product = 0x0001;
|
||||
emumousebtn->id.version = 0x0100;
|
||||
|
||||
emumousebtn->evbit[0] = BIT(EV_KEY) | BIT(EV_REL);
|
||||
emumousebtn->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT);
|
||||
emumousebtn->relbit[0] = BIT(REL_X) | BIT(REL_Y);
|
||||
emumousebtn->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
|
||||
emumousebtn->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) |
|
||||
BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT);
|
||||
emumousebtn->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y);
|
||||
|
||||
ret = input_register_device(emumousebtn);
|
||||
if (ret)
|
||||
|
|
|
|||
Loading…
Reference in a new issue