summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-11-14 08:16:15 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-11-29 09:30:22 -0800
commit5cc0dfe043f84a777bf9d66dc48cc2b83709c9ef (patch)
tree03c067c8a92d0c9f76b42cdbd87bb4057e2ef53a /drivers/input
parentcdbe8a86379b9002598a4d14791dc8e790b1f5f5 (diff)
downloadop-kernel-dev-5cc0dfe043f84a777bf9d66dc48cc2b83709c9ef.zip
op-kernel-dev-5cc0dfe043f84a777bf9d66dc48cc2b83709c9ef.tar.gz
Input: tca8418_keypad - move device ID tables closer to where they are used
This matches structure of most other input drivers. Reviewed-by: Alban Bedel <alban.bedel@avionic-design.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/tca8418_keypad.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c
index ab41a2e..9084327 100644
--- a/drivers/input/keyboard/tca8418_keypad.c
+++ b/drivers/input/keyboard/tca8418_keypad.c
@@ -110,21 +110,6 @@
#define KEY_EVENT_CODE 0x7f
#define KEY_EVENT_VALUE 0x80
-
-static const struct i2c_device_id tca8418_id[] = {
- { TCA8418_NAME, 8418, },
- { }
-};
-MODULE_DEVICE_TABLE(i2c, tca8418_id);
-
-#ifdef CONFIG_OF
-static const struct of_device_id tca8418_dt_ids[] __devinitconst = {
- { .compatible = "ti,tca8418", },
- { }
-};
-MODULE_DEVICE_TABLE(of, tca8418_dt_ids);
-#endif
-
struct tca8418_keypad {
unsigned int irq;
unsigned int row_shift;
@@ -419,6 +404,20 @@ static int tca8418_keypad_remove(struct i2c_client *client)
return 0;
}
+static const struct i2c_device_id tca8418_id[] = {
+ { TCA8418_NAME, 8418, },
+ { }
+};
+MODULE_DEVICE_TABLE(i2c, tca8418_id);
+
+#ifdef CONFIG_OF
+static const struct of_device_id tca8418_dt_ids[] __devinitconst = {
+ { .compatible = "ti,tca8418", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, tca8418_dt_ids);
+#endif
+
static struct i2c_driver tca8418_keypad_driver = {
.driver = {
.name = TCA8418_NAME,
OpenPOWER on IntegriCloud