Commit 9360353f authored by Dmitry Torokhov's avatar Dmitry Torokhov

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: default avatarDmitry Torokhov <dtor@mail.ru>
parent 62e729b6
...@@ -318,7 +318,7 @@ static int __init omap_kp_probe(struct platform_device *pdev) ...@@ -318,7 +318,7 @@ static int __init omap_kp_probe(struct platform_device *pdev)
keymap = pdata->keymap; keymap = pdata->keymap;
if (pdata->rep) if (pdata->rep)
set_bit(EV_REP, input_dev->evbit); __set_bit(EV_REP, input_dev->evbit);
if (pdata->delay) if (pdata->delay)
omap_kp->delay = pdata->delay; omap_kp->delay = pdata->delay;
...@@ -365,9 +365,9 @@ static int __init omap_kp_probe(struct platform_device *pdev) ...@@ -365,9 +365,9 @@ static int __init omap_kp_probe(struct platform_device *pdev)
goto err2; goto err2;
/* setup input device */ /* setup input device */
set_bit(EV_KEY, input_dev->evbit); __set_bit(EV_KEY, input_dev->evbit);
for (i = 0; keymap[i] != 0; i++) for (i = 0; keymap[i] != 0; i++)
set_bit(keymap[i] & KEY_MAX, input_dev->keybit); __set_bit(keymap[i] & KEY_MAX, input_dev->keybit);
input_dev->name = "omap-keypad"; input_dev->name = "omap-keypad";
input_dev->phys = "omap-keypad/input0"; input_dev->phys = "omap-keypad/input0";
input_dev->dev.parent = &pdev->dev; input_dev->dev.parent = &pdev->dev;
...@@ -377,10 +377,6 @@ static int __init omap_kp_probe(struct platform_device *pdev) ...@@ -377,10 +377,6 @@ static int __init omap_kp_probe(struct platform_device *pdev)
input_dev->id.product = 0x0001; input_dev->id.product = 0x0001;
input_dev->id.version = 0x0100; input_dev->id.version = 0x0100;
input_dev->keycode = keymap;
input_dev->keycodesize = sizeof(unsigned int);
input_dev->keycodemax = pdata->keymapsize;
ret = input_register_device(omap_kp->input); ret = input_register_device(omap_kp->input);
if (ret < 0) { if (ret < 0) {
printk(KERN_ERR "Unable to register omap-keypad input device\n"); printk(KERN_ERR "Unable to register omap-keypad input device\n");
...@@ -411,7 +407,7 @@ static int __init omap_kp_probe(struct platform_device *pdev) ...@@ -411,7 +407,7 @@ static int __init omap_kp_probe(struct platform_device *pdev)
} }
return 0; return 0;
err5: err5:
for (i = irq_idx-1; i >=0; i--) for (i = irq_idx - 1; i >=0; i--)
free_irq(row_gpios[i], 0); free_irq(row_gpios[i], 0);
err4: err4:
input_unregister_device(omap_kp->input); input_unregister_device(omap_kp->input);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment