iio: dac: ad5446: fix OF module device table
PATCH 1/1 iio: dac: ad5446: fix OF module device table
The ad5446 I2C driver exports its OF match table with MODULE_DEVICE_TABLE(OF, ...).
The device table type is used by modpost when generating module aliases, and scripts/mod/file2alias.c matches the lowercase "of" type. Using "OF" prevents the OF table from being recognized, so no OF module alias is generated for the I2C driver.
Use the lowercase "of" type so OF-based module autoloading works.
--- drivers/iio/dac/ad5446-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5446-i2c.c +1 -1
@@ -83,7 +83,7 @@ static const struct of_device_id ad5446_i2c_of_ids[] = { { .compatible = "adi,ad5622", .data = &ad5622_chip_info }, { } }; -MODULE_DEVICE_TABLE (OF , ad5446_i2c_of_ids); +MODULE_DEVICE_TABLE (of, ad5446_i2c_of_ids);static struct i2c_driver ad5446_i2c_driver = { .driver = {
Signature · 1 line
2.53.0
Quoted 9 lines · Can Peng
The ad5446 I2C driver exports its OF match table with
MODULE_DEVICE_TABLE(OF, ...).The device table type is used by modpost when generating module aliases, and
scripts/mod/file2alias.cmatches the lowercase "of" type. Using "OF" prevents the OF table from being recognized, so no OF module alias is generated for the I2C driver.Use the lowercase "of" type so OF-based module autoloading works.
Good catch!
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 8 lines · On Tue, 14 Jul 2026 17:18:45 +0800 Can Peng <[email protected]> wrote:
The ad5446 I2C driver exports its OF match table with
MODULE_DEVICE_TABLE(OF, ...).The device table type is used by modpost when generating module aliases, and
scripts/mod/file2alias.cmatches the lowercase "of" type. Using "OF" prevents the OF table from being recognized, so no OF module alias is generated for the I2C driver.
Quoted 5 lines
Use the lowercase "of" type so OF-based module autoloading works.
Fixes 876d94024087 ("iio: dac: ad5446: Separate I2C/SPI into different drivers")Signed-off-by Can Peng <[email protected]>---
This needs a Cc: stable tag, perhaps Jonathan can add it when applying.
FWIW,
Signature · 3 lines
Kind regards CJD
Jonathan Cameron
AppliedQuoted 17 lines · On Wed, 15 Jul 2026 10:11:19 +0200 Joshua Crofts <[email protected]>…
Quoted 8 lines · On Tue, 14 Jul 2026 17:18:45 +0800 Can Peng <[email protected]> wrote:
The ad5446 I2C driver exports its OF match table with
MODULE_DEVICE_TABLE(OF, ...).The device table type is used by modpost when generating module aliases, and
scripts/mod/file2alias.cmatches the lowercase "of" type. Using "OF" prevents the OF table from being recognized, so no OF module alias is generated for the I2C driver.Quoted 5 lines
Use the lowercase "of" type so OF-based module autoloading works.
Fixes 876d94024087 ("iio: dac: ad5446: Separate I2C/SPI into different drivers")Signed-off-by Can Peng <[email protected]>---
Quoted 6 lines
This needs a Cc: stable tag, perhaps Jonathan can add it when applying.
FWIW,
Reviewed-by Joshua Crofts <[email protected]>
Applied to the fixes-togreg branch of iio.git and marked for stable.
Thanks
Jonathan