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>
此提交包含在:

提交者
Jonathan Cameron

父節點
194dc4c714
當前提交
cdd469ad9e
@@ -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[] = {
|
||||
|
@@ -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,
|
||||
|
新增問題並參考
封鎖使用者