summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. H. Nikolaus Schaller <hns@goldelico.com>2014-04-25 08:43:36 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-04-25 08:53:14 +0200
commitc16134976fb27d325ae037a8b39b537a77ba1d12 (patch)
tree1b184b4e8054e805fdff11ba2fce5f88ca491b9c
parentInput: bma150 - extend chip detection for bma180 (diff)
downloadlinux-c16134976fb27d325ae037a8b39b537a77ba1d12.tar.xz
linux-c16134976fb27d325ae037a8b39b537a77ba1d12.zip
Input: tca8418 - fix loading this driver as a module from a device tree
Loading the tca8418 driver as a module on a device tree based system needs a MODULE_ALIAS because the driver name does not match the automatic name generation rules of a 'compatible' entry on i2c bus. Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/keyboard/tca8418_keypad.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c
index 55c15304ddbc..4e491c1762cf 100644
--- a/drivers/input/keyboard/tca8418_keypad.c
+++ b/drivers/input/keyboard/tca8418_keypad.c
@@ -392,6 +392,13 @@ static const struct of_device_id tca8418_dt_ids[] = {
{ }
};
MODULE_DEVICE_TABLE(of, tca8418_dt_ids);
+
+/*
+ * The device tree based i2c loader looks for
+ * "i2c:" + second_component_of(property("compatible"))
+ * and therefore we need an alias to be found.
+ */
+MODULE_ALIAS("i2c:tca8418");
#endif
static struct i2c_driver tca8418_keypad_driver = {