aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard
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/input/keyboard
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/input/keyboard')
-rw-r--r--drivers/input/keyboard/aaed2000_kbd.c2
-rw-r--r--drivers/input/keyboard/amikbd.c2
-rw-r--r--drivers/input/keyboard/atakbd.c2
-rw-r--r--drivers/input/keyboard/atkbd.c21
-rw-r--r--drivers/input/keyboard/corgikbd.c3
-rw-r--r--drivers/input/keyboard/gpio_keys.c2
-rw-r--r--drivers/input/keyboard/hil_kbd.c5
-rw-r--r--drivers/input/keyboard/hilkbd.c5
-rw-r--r--drivers/input/keyboard/locomokbd.c2
-rw-r--r--drivers/input/keyboard/newtonkbd.c2
-rw-r--r--drivers/input/keyboard/pxa27x_keyboard.c5
-rw-r--r--drivers/input/keyboard/spitzkbd.c3
-rw-r--r--drivers/input/keyboard/stowaway.c2
-rw-r--r--drivers/input/keyboard/sunkbd.c8
-rw-r--r--drivers/input/keyboard/xtkbd.c2
15 files changed, 39 insertions, 27 deletions
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);