From cdd469ad9e008a58ed465efa09f8594f1387e8ce Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Tue, 17 May 2016 12:25:37 -0400 Subject: iio: Export I2C module alias information The I2C drivers have an i2c_device_id array but that information isn't exported to the modules using the MODULE_DEVICE_TABLE() macro. So the modules autoloading won't work if the I2C device is registered using OF or legacy board files due missing alias information in the modules. The issue was found using Kieran Bingham's coccinelle semantic patch: https://lkml.org/lkml/2016/5/10/520 Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron --- drivers/iio/pressure/ms5637.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/iio/pressure/ms5637.c') diff --git a/drivers/iio/pressure/ms5637.c b/drivers/iio/pressure/ms5637.c index e68052c118e6..8fb6f7ab97e4 100644 --- a/drivers/iio/pressure/ms5637.c +++ b/drivers/iio/pressure/ms5637.c @@ -173,6 +173,7 @@ static const struct i2c_device_id ms5637_id[] = { {"ms8607-temppressure", 1}, {} }; +MODULE_DEVICE_TABLE(i2c, ms5637_id); static struct i2c_driver ms5637_driver = { .probe = ms5637_probe, -- cgit v1.2.3