From: Dr. H. Nikolaus Schaller Date: Fri, 25 Apr 2014 06:43:36 +0000 (-0700) Subject: Input: tca8418 - fix loading this driver as a module from a device tree X-Git-Tag: v4.9.8~2718^2~202 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c16134976fb27d325ae037a8b39b537a77ba1d12;p=platform%2Fkernel%2Flinux-rpi3.git 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 Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c index 55c1530..4e491c1 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 = {