diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2016-05-17 18:25:37 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-05-21 21:08:14 +0200 |
commit | cdd469ad9e008a58ed465efa09f8594f1387e8ce (patch) | |
tree | 45b855635210acbda338ee5d866fe482b5f00933 /drivers/iio/humidity | |
parent | iio: accel: Add triggered buffer support for BMA220 (diff) | |
download | linux-cdd469ad9e008a58ed465efa09f8594f1387e8ce.tar.xz linux-cdd469ad9e008a58ed465efa09f8594f1387e8ce.zip |
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 <javier@osg.samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/humidity')
-rw-r--r-- | drivers/iio/humidity/am2315.c | 1 | ||||
-rw-r--r-- | drivers/iio/humidity/htu21.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/humidity/am2315.c b/drivers/iio/humidity/am2315.c index 3be6d209a159..8de39bd349f9 100644 --- a/drivers/iio/humidity/am2315.c +++ b/drivers/iio/humidity/am2315.c @@ -278,6 +278,7 @@ static const struct i2c_device_id am2315_i2c_id[] = { {"am2315", 0}, {} }; +MODULE_DEVICE_TABLE(i2c, am2315_i2c_id); static const struct acpi_device_id am2315_acpi_id[] = { {"AOS2315", 0}, diff --git a/drivers/iio/humidity/htu21.c b/drivers/iio/humidity/htu21.c index 11cbc38b450f..0fbbd8c40894 100644 --- a/drivers/iio/humidity/htu21.c +++ b/drivers/iio/humidity/htu21.c @@ -236,6 +236,7 @@ static const struct i2c_device_id htu21_id[] = { {"ms8607-humidity", MS8607}, {} }; +MODULE_DEVICE_TABLE(i2c, htu21_id); static struct i2c_driver htu21_driver = { .probe = htu21_probe, |