From: Dmitry Torokhov Date: Wed, 14 Nov 2012 16:16:15 +0000 (-0800) Subject: Input: tca8418_keypad - move device ID tables closer to where they are used X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5cc0dfe043f84a777bf9d66dc48cc2b83709c9ef;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c index ab41a2ea305..9084327efb3 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,