aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2007-10-12 14:20:00 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2007-10-12 14:20:00 -0400
commit9360353f4aa40688eef4c71e4688411490727e40 (patch)
tree7de1b8e5a9e68b269601b712ccddefebac47d6a7 /drivers/input/keyboard
parent62e729b648c980dfdbfdf8d677cde0d78cd4a51d (diff)
Input: omap-keyboard - don't pretend we support changing keymap
The driver's keymap is a mix of hardware codes and keycodes and so may not be used with default implementations of getkeycode() and setkeycode(). Also some whitespace cleanup. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/omap-keypad.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c
index 3a228634f101..76f1969552c5 100644
--- a/drivers/input/keyboard/omap-keypad.c
+++ b/drivers/input/keyboard/omap-keypad.c
@@ -233,7 +233,7 @@ static void omap_kp_tasklet(unsigned long data)
233 omap_writew(0, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); 233 omap_writew(0, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT);
234 kp_cur_group = -1; 234 kp_cur_group = -1;
235 } 235 }
236 } 236 }
237} 237}
238 238
239static ssize_t omap_kp_enable_show(struct device *dev, 239static ssize_t omap_kp_enable_show(struct device *dev,
@@ -318,7 +318,7 @@ static int __init omap_kp_probe(struct platform_device *pdev)
318 keymap = pdata->keymap; 318 keymap = pdata->keymap;
319 319
320 if (pdata->rep) 320 if (pdata->rep)
321 set_bit(EV_REP, input_dev->evbit); 321 __set_bit(EV_REP, input_dev->evbit);
322 322
323 if (pdata->delay) 323 if (pdata->delay)
324 omap_kp->delay = pdata->delay; 324 omap_kp->delay = pdata->delay;
@@ -365,9 +365,9 @@ static int __init omap_kp_probe(struct platform_device *pdev)
365 goto err2; 365 goto err2;
366 366
367 /* setup input device */ 367 /* setup input device */
368 set_bit(EV_KEY, input_dev->evbit); 368 __set_bit(EV_KEY, input_dev->evbit);
369 for (i = 0; keymap[i] != 0; i++) 369 for (i = 0; keymap[i] != 0; i++)
370 set_bit(keymap[i] & KEY_MAX, input_dev->keybit); 370 __set_bit(keymap[i] & KEY_MAX, input_dev->keybit);
371 input_dev->name = "omap-keypad"; 371 input_dev->name = "omap-keypad";
372 input_dev->phys = "omap-keypad/input0"; 372 input_dev->phys = "omap-keypad/input0";
373 input_dev->dev.parent = &pdev->dev; 373 input_dev->dev.parent = &pdev->dev;
@@ -377,10 +377,6 @@ static int __init omap_kp_probe(struct platform_device *pdev)
377 input_dev->id.product = 0x0001; 377 input_dev->id.product = 0x0001;
378 input_dev->id.version = 0x0100; 378 input_dev->id.version = 0x0100;
379 379
380 input_dev->keycode = keymap;
381 input_dev->keycodesize = sizeof(unsigned int);
382 input_dev->keycodemax = pdata->keymapsize;
383
384 ret = input_register_device(omap_kp->input); 380 ret = input_register_device(omap_kp->input);
385 if (ret < 0) { 381 if (ret < 0) {
386 printk(KERN_ERR "Unable to register omap-keypad input device\n"); 382 printk(KERN_ERR "Unable to register omap-keypad input device\n");
@@ -403,15 +399,15 @@ static int __init omap_kp_probe(struct platform_device *pdev)
403 } else { 399 } else {
404 for (irq_idx = 0; irq_idx < omap_kp->rows; irq_idx++) { 400 for (irq_idx = 0; irq_idx < omap_kp->rows; irq_idx++) {
405 if (request_irq(OMAP_GPIO_IRQ(row_gpios[irq_idx]), 401 if (request_irq(OMAP_GPIO_IRQ(row_gpios[irq_idx]),
406 omap_kp_interrupt, 402 omap_kp_interrupt,
407 IRQF_TRIGGER_FALLING, 403 IRQF_TRIGGER_FALLING,
408 "omap-keypad", omap_kp) < 0) 404 "omap-keypad", omap_kp) < 0)
409 goto err5; 405 goto err5;
410 } 406 }
411 } 407 }
412 return 0; 408 return 0;
413err5: 409err5:
414 for (i = irq_idx-1; i >=0; i--) 410 for (i = irq_idx - 1; i >=0; i--)
415 free_irq(row_gpios[i], 0); 411 free_irq(row_gpios[i], 0);
416err4: 412err4:
417 input_unregister_device(omap_kp->input); 413 input_unregister_device(omap_kp->input);
@@ -440,9 +436,9 @@ static int omap_kp_remove(struct platform_device *pdev)
440 if (cpu_is_omap24xx()) { 436 if (cpu_is_omap24xx()) {
441 int i; 437 int i;
442 for (i = 0; i < omap_kp->cols; i++) 438 for (i = 0; i < omap_kp->cols; i++)
443 omap_free_gpio(col_gpios[i]); 439 omap_free_gpio(col_gpios[i]);
444 for (i = 0; i < omap_kp->rows; i++) { 440 for (i = 0; i < omap_kp->rows; i++) {
445 omap_free_gpio(row_gpios[i]); 441 omap_free_gpio(row_gpios[i]);
446 free_irq(OMAP_GPIO_IRQ(row_gpios[i]), 0); 442 free_irq(OMAP_GPIO_IRQ(row_gpios[i]), 0);
447 } 443 }
448 } else { 444 } else {