diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-11-14 11:16:15 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-11-29 12:30:22 -0500 |
commit | 5cc0dfe043f84a777bf9d66dc48cc2b83709c9ef (patch) | |
tree | 03c067c8a92d0c9f76b42cdbd87bb4057e2ef53a /drivers/input | |
parent | cdbe8a86379b9002598a4d14791dc8e790b1f5f5 (diff) |
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.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c index ab41a2ea3055..9084327efb3a 100644 --- a/drivers/input/keyboard/tca8418_keypad.c +++ b/drivers/input/keyboard/tca8418_keypad.c | |||
@@ -110,21 +110,6 @@ | |||
110 | #define KEY_EVENT_CODE 0x7f | 110 | #define KEY_EVENT_CODE 0x7f |
111 | #define KEY_EVENT_VALUE 0x80 | 111 | #define KEY_EVENT_VALUE 0x80 |
112 | 112 | ||
113 | |||
114 | static const struct i2c_device_id tca8418_id[] = { | ||
115 | { TCA8418_NAME, 8418, }, | ||
116 | { } | ||
117 | }; | ||
118 | MODULE_DEVICE_TABLE(i2c, tca8418_id); | ||
119 | |||
120 | #ifdef CONFIG_OF | ||
121 | static const struct of_device_id tca8418_dt_ids[] __devinitconst = { | ||
122 | { .compatible = "ti,tca8418", }, | ||
123 | { } | ||
124 | }; | ||
125 | MODULE_DEVICE_TABLE(of, tca8418_dt_ids); | ||
126 | #endif | ||
127 | |||
128 | struct tca8418_keypad { | 113 | struct tca8418_keypad { |
129 | unsigned int irq; | 114 | unsigned int irq; |
130 | unsigned int row_shift; | 115 | unsigned int row_shift; |
@@ -419,6 +404,20 @@ static int tca8418_keypad_remove(struct i2c_client *client) | |||
419 | return 0; | 404 | return 0; |
420 | } | 405 | } |
421 | 406 | ||
407 | static const struct i2c_device_id tca8418_id[] = { | ||
408 | { TCA8418_NAME, 8418, }, | ||
409 | { } | ||
410 | }; | ||
411 | MODULE_DEVICE_TABLE(i2c, tca8418_id); | ||
412 | |||
413 | #ifdef CONFIG_OF | ||
414 | static const struct of_device_id tca8418_dt_ids[] __devinitconst = { | ||
415 | { .compatible = "ti,tca8418", }, | ||
416 | { } | ||
417 | }; | ||
418 | MODULE_DEVICE_TABLE(of, tca8418_dt_ids); | ||
419 | #endif | ||
420 | |||
422 | static struct i2c_driver tca8418_keypad_driver = { | 421 | static struct i2c_driver tca8418_keypad_driver = { |
423 | .driver = { | 422 | .driver = { |
424 | .name = TCA8418_NAME, | 423 | .name = TCA8418_NAME, |