lkml.org 
[lkml]   [2015]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH V1 2/6] ASoC: tlv320aic26: Fix module autoload
Date
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@criticallink.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 65c2bfb02e76..bf3a9ec40e1e 100644
--- a/sound/soc/codecs/tlv320aic26.c
+++ b/sound/soc/codecs/tlv320aic26.c
@@ -370,10 +370,17 @@ 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);
+
static const struct of_device_id tlv320aic26_of_match[] = {
{ .compatible = "ti,tlv320aic26", },
{},
};
+MODULE_DEVICE_TABLE(of, tlv320aic26_of_match);

static struct spi_driver aic26_spi = {
.driver = {
@@ -383,6 +390,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


\
 
 \ /
  Last update: 2015-09-25 20:41    [W:0.073 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site