mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: nau8825: Export I2C module alias information
@ 2016-05-17 16:00 Javier Martinez Canillas
  0 siblings, 0 replies; only message in thread
From: Javier Martinez Canillas @ 2016-05-17 16:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kieran Bingham, Javier Martinez Canillas, Jaroslav Kysela,
	John Hsu, alsa-devel, Mark Brown, Takashi Iwai, Liam Girdwood,
	Anatol Pomozov, Yong Zhi, Yang A",
	kbuild test robot, Ben Zhang

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 <javier@osg.samsung.com>

---

 sound/soc/codecs/nau8825.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c
index 81fc97b07751..e988f89ef715 100644
--- a/sound/soc/codecs/nau8825.c
+++ b/sound/soc/codecs/nau8825.c
@@ -1493,6 +1493,7 @@ static const struct i2c_device_id nau8825_i2c_ids[] = {
 	{ "nau8825", 0 },
 	{ }
 };
+MODULE_DEVICE_TABLE(i2c, nau8825_i2c_ids);
 
 #ifdef CONFIG_OF
 static const struct of_device_id nau8825_of_ids[] = {
-- 
2.5.5

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-17 16:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-17 16:00 [PATCH] ASoC: nau8825: Export I2C module alias information Javier Martinez Canillas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®