summaryrefslogtreecommitdiffstats
path: root/drivers/iio/pressure/hp206c.c
diff options
context:
space:
mode:
authorJavier Martinez Canillas2016-05-17 18:25:37 +0200
committerJonathan Cameron2016-05-21 21:08:14 +0200
commitcdd469ad9e008a58ed465efa09f8594f1387e8ce (patch)
tree45b855635210acbda338ee5d866fe482b5f00933 /drivers/iio/pressure/hp206c.c
parentiio: accel: Add triggered buffer support for BMA220 (diff)
downloadkernel-qcow2-linux-cdd469ad9e008a58ed465efa09f8594f1387e8ce.tar.gz
kernel-qcow2-linux-cdd469ad9e008a58ed465efa09f8594f1387e8ce.tar.xz
kernel-qcow2-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/pressure/hp206c.c')
-rw-r--r--drivers/iio/pressure/hp206c.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/pressure/hp206c.c b/drivers/iio/pressure/hp206c.c
index 90f2b6e4a920..12f769e86355 100644
--- a/drivers/iio/pressure/hp206c.c
+++ b/drivers/iio/pressure/hp206c.c
@@ -401,6 +401,7 @@ static const struct i2c_device_id hp206c_id[] = {
{"hp206c"},
{}
};
+MODULE_DEVICE_TABLE(i2c, hp206c_id);
#ifdef CONFIG_ACPI
static const struct acpi_device_id hp206c_acpi_match[] = {