Skip to content

Commit ffd7250

Browse files
Javier Martinez Canillasbroonie
authored andcommitted
ASoC: nau8825: Export I2C module alias information
The I2C driver has an i2c_device_id array but that information isn't exported to the module using the MODULE_DEVICE_TABLE() macro. So the module autoloading won't work if the I2C device is registered using OF or legacy board files due missing alias information in the module. 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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 3f03916 commit ffd7250

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sound/soc/codecs/nau8825.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,6 +1493,7 @@ static const struct i2c_device_id nau8825_i2c_ids[] = {
14931493
{ "nau8825", 0 },
14941494
{ }
14951495
};
1496+
MODULE_DEVICE_TABLE(i2c, nau8825_i2c_ids);
14961497

14971498
#ifdef CONFIG_OF
14981499
static const struct of_device_id nau8825_of_ids[] = {

0 commit comments

Comments
 (0)