Skip to content

Commit

Permalink
Input: tca8418_keypad - move device ID tables closer to where they ar…
Browse files Browse the repository at this point in the history
…e 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>
  • Loading branch information
Dmitry Torokhov committed Nov 29, 2012
1 parent cdbe8a8 commit 5cc0dfe
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions drivers/input/keyboard/tca8418_keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 5cc0dfe

Please sign in to comment.