From: Javier Martinez Canillas Date: Tue, 18 Oct 2016 21:01:47 +0000 (-0300) Subject: i2c: xlr: Fix module autoload for OF registration X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2cb496db3d56baa86d53022044c4d25ffe7fa038;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git i2c: xlr: Fix module autoload for OF registration If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Signed-off-by: Javier Martinez Canillas Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-xlr.c b/drivers/i2c/busses/i2c-xlr.c index 0968f59b6df5..ad17d88d8573 100644 --- a/drivers/i2c/busses/i2c-xlr.c +++ b/drivers/i2c/busses/i2c-xlr.c @@ -358,6 +358,7 @@ static const struct of_device_id xlr_i2c_dt_ids[] = { }, { } }; +MODULE_DEVICE_TABLE(of, xlr_i2c_dt_ids); static int xlr_i2c_probe(struct platform_device *pdev) {