[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1442607076-26681-3-git-send-email-jcormier@criticallink.com>
Date: Fri, 18 Sep 2015 16:11:11 -0400
From: "Cormier, Jonathan" <jcormier@...ticallink.com>
To: Liam Girdwood <lgirdwood@...il.com>
Cc: Bob Duke <bduke@...ticallink.com>,
Mike Williamson <michael.williamson@...ticallink.com>,
Mark Brown <broonie@...aro.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Peter Ujfalusi <peter.ujfalusi@...com>,
Jyri Sarha <jsarha@...com>,
Misael Lopez Cruz <misael.lopez@...com>,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
Greg Gluszek <greg.gluszek@...ticallink.com>,
"Cormier, Jonathan" <jcormier@...ticallink.com>
Subject: [PATCH RFC 2/7] ASoC: tlv320aic26: Fix module autoload
Add the missing MODULE_DEVICE_TABLE() for OF and SPI to export
the information so modules have the correct aliases built-in and
autoloading works correctly.
A longer explanation by Javier Canillas can be found here:
https://lkml.org/lkml/2015/7/30/519
https://lkml.org/lkml/2014/9/11/458
Signed-off-by: Cormier, Jonathan <jcormier@...ticallink.com>
---
sound/soc/codecs/tlv320aic26.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c
index 91fdd96648bd..91347727cfae 100644
--- a/sound/soc/codecs/tlv320aic26.c
+++ b/sound/soc/codecs/tlv320aic26.c
@@ -370,11 +370,18 @@ static int aic26_spi_remove(struct spi_device *spi)
return 0;
}
+static const struct spi_device_id tlv320aic26_id_table[] = {
+ { "tlv320aic26" },
+ {},
+};
+MODULE_DEVICE_TABLE(spi, tlv320aic26_id_table);
+
#if defined(CONFIG_OF)
static const struct of_device_id tlv320aic26_of_match[] = {
{ .compatible = "ti,tlv320aic26", },
{},
};
+MODULE_DEVICE_TABLE(of, tlv320aic26_of_match);
#endif
static struct spi_driver aic26_spi = {
@@ -387,6 +394,7 @@ static struct spi_driver aic26_spi = {
},
.probe = aic26_spi_probe,
.remove = aic26_spi_remove,
+ .id_table = tlv320aic26_id_table,
};
module_spi_driver(aic26_spi);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists