You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07: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 <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>
This commit is contained in:
committed by
Linus Torvalds
parent
d05be13bcc
commit
7b19ada2ed
@@ -662,10 +662,10 @@ static void ati_remote_input_init(struct ati_remote *ati_remote)
|
||||
struct input_dev *idev = ati_remote->idev;
|
||||
int i;
|
||||
|
||||
idev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL);
|
||||
idev->keybit[LONG(BTN_MOUSE)] = ( BIT(BTN_LEFT) | BIT(BTN_RIGHT) |
|
||||
BIT(BTN_SIDE) | BIT(BTN_EXTRA) );
|
||||
idev->relbit[0] = BIT(REL_X) | BIT(REL_Y);
|
||||
idev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
|
||||
idev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) |
|
||||
BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_SIDE) | BIT_MASK(BTN_EXTRA);
|
||||
idev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y);
|
||||
for (i = 0; ati_remote_tbl[i].kind != KIND_END; i++)
|
||||
if (ati_remote_tbl[i].type == EV_KEY)
|
||||
set_bit(ati_remote_tbl[i].code, idev->keybit);
|
||||
|
||||
@@ -346,9 +346,10 @@ static int ati_remote2_input_init(struct ati_remote2 *ar2)
|
||||
ar2->idev = idev;
|
||||
input_set_drvdata(idev, ar2);
|
||||
|
||||
idev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_REL);
|
||||
idev->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT);
|
||||
idev->relbit[0] = BIT(REL_X) | BIT(REL_Y);
|
||||
idev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | BIT_MASK(EV_REL);
|
||||
idev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) |
|
||||
BIT_MASK(BTN_RIGHT);
|
||||
idev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y);
|
||||
for (i = 0; ati_remote2_key_table[i].key_code != KEY_RESERVED; i++)
|
||||
set_bit(ati_remote2_key_table[i].key_code, idev->keybit);
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ static int atlas_acpi_button_add(struct acpi_device *device)
|
||||
input_dev->name = "Atlas ACPI button driver";
|
||||
input_dev->phys = "ASIM0000/atlas/input0";
|
||||
input_dev->id.bustype = BUS_HOST;
|
||||
input_dev->evbit[LONG(EV_KEY)] = BIT(EV_KEY);
|
||||
input_dev->evbit[BIT_WORD(EV_KEY)] = BIT_MASK(EV_KEY);
|
||||
|
||||
set_bit(KEY_F1, input_dev->keybit);
|
||||
set_bit(KEY_F2, input_dev->keybit);
|
||||
|
||||
@@ -104,7 +104,7 @@ static int __devinit cobalt_buttons_probe(struct platform_device *pdev)
|
||||
input->id.bustype = BUS_HOST;
|
||||
input->cdev.dev = &pdev->dev;
|
||||
|
||||
input->evbit[0] = BIT(EV_KEY);
|
||||
input->evbit[0] = BIT_MASK(EV_KEY);
|
||||
for (i = 0; i < ARRAY_SIZE(buttons_map); i++) {
|
||||
set_bit(buttons_map[i].keycode, input->keybit);
|
||||
buttons_map[i].count = 0;
|
||||
|
||||
@@ -109,8 +109,8 @@ static int __devinit ixp4xx_spkr_probe(struct platform_device *dev)
|
||||
input_dev->id.version = 0x0100;
|
||||
input_dev->dev.parent = &dev->dev;
|
||||
|
||||
input_dev->evbit[0] = BIT(EV_SND);
|
||||
input_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE);
|
||||
input_dev->evbit[0] = BIT_MASK(EV_SND);
|
||||
input_dev->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE);
|
||||
input_dev->event = ixp4xx_spkr_event;
|
||||
|
||||
err = request_irq(IRQ_IXP4XX_TIMER2, &ixp4xx_spkr_interrupt,
|
||||
|
||||
@@ -497,7 +497,7 @@ static int keyspan_probe(struct usb_interface *interface, const struct usb_devic
|
||||
usb_to_input_id(udev, &input_dev->id);
|
||||
input_dev->dev.parent = &interface->dev;
|
||||
|
||||
input_dev->evbit[0] = BIT(EV_KEY); /* We will only report KEY events. */
|
||||
input_dev->evbit[0] = BIT_MASK(EV_KEY); /* We will only report KEY events. */
|
||||
for (i = 0; i < ARRAY_SIZE(keyspan_key_table); i++)
|
||||
if (keyspan_key_table[i] != KEY_RESERVED)
|
||||
set_bit(keyspan_key_table[i], input_dev->keybit);
|
||||
|
||||
@@ -65,8 +65,8 @@ static int __devinit m68kspkr_probe(struct platform_device *dev)
|
||||
input_dev->id.version = 0x0100;
|
||||
input_dev->dev.parent = &dev->dev;
|
||||
|
||||
input_dev->evbit[0] = BIT(EV_SND);
|
||||
input_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE);
|
||||
input_dev->evbit[0] = BIT_MASK(EV_SND);
|
||||
input_dev->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE);
|
||||
input_dev->event = m68kspkr_event;
|
||||
|
||||
err = input_register_device(input_dev);
|
||||
|
||||
@@ -86,8 +86,8 @@ static int __devinit pcspkr_probe(struct platform_device *dev)
|
||||
pcspkr_dev->id.version = 0x0100;
|
||||
pcspkr_dev->dev.parent = &dev->dev;
|
||||
|
||||
pcspkr_dev->evbit[0] = BIT(EV_SND);
|
||||
pcspkr_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE);
|
||||
pcspkr_dev->evbit[0] = BIT_MASK(EV_SND);
|
||||
pcspkr_dev->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE);
|
||||
pcspkr_dev->event = pcspkr_event;
|
||||
|
||||
err = input_register_device(pcspkr_dev);
|
||||
|
||||
@@ -363,10 +363,11 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i
|
||||
|
||||
input_dev->event = powermate_input_event;
|
||||
|
||||
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_MSC);
|
||||
input_dev->keybit[LONG(BTN_0)] = BIT(BTN_0);
|
||||
input_dev->relbit[LONG(REL_DIAL)] = BIT(REL_DIAL);
|
||||
input_dev->mscbit[LONG(MSC_PULSELED)] = BIT(MSC_PULSELED);
|
||||
input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL) |
|
||||
BIT_MASK(EV_MSC);
|
||||
input_dev->keybit[BIT_WORD(BTN_0)] = BIT_MASK(BTN_0);
|
||||
input_dev->relbit[BIT_WORD(REL_DIAL)] = BIT_MASK(REL_DIAL);
|
||||
input_dev->mscbit[BIT_WORD(MSC_PULSELED)] = BIT_MASK(MSC_PULSELED);
|
||||
|
||||
/* get a handle to the interrupt data pipe */
|
||||
pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress);
|
||||
|
||||
@@ -115,8 +115,8 @@ static int __devinit sparcspkr_probe(struct device *dev)
|
||||
input_dev->id.version = 0x0100;
|
||||
input_dev->dev.parent = dev;
|
||||
|
||||
input_dev->evbit[0] = BIT(EV_SND);
|
||||
input_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE);
|
||||
input_dev->evbit[0] = BIT_MASK(EV_SND);
|
||||
input_dev->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE);
|
||||
|
||||
input_dev->event = state->event;
|
||||
|
||||
|
||||
@@ -945,7 +945,7 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
||||
/* input_dev->event = input_ev; TODO */
|
||||
|
||||
/* register available key events */
|
||||
input_dev->evbit[0] = BIT(EV_KEY);
|
||||
input_dev->evbit[0] = BIT_MASK(EV_KEY);
|
||||
for (i = 0; i < 256; i++) {
|
||||
int k = map_p1k_to_key(i);
|
||||
if (k >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user