Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1233012

[PATCH V1 2/6] ASoC: tlv320aic26: Fix module autoload

From "Cormier, Jonathan" <jcormier@criticallink.com>
Newsgroups linux.kernel
Subject [PATCH V1 2/6] ASoC: tlv320aic26: Fix module autoload
Date 2015-09-25 20:40 +0200
Message-ID <qcG4y-176-25@gated-at.bofh.it> (permalink)
References <qaait-4Bi-3@gated-at.bofh.it> <qcG4y-176-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH  V1 0/6] ASoC: tlv320aic26: Add device tree support and bug fixes "Cormier, Jonathan" <jcormier@criticallink.com> - 2015-09-25 20:40 +0200
  [PATCH  V1 1/6] ASoC: tlv320aic26: Add device tree binding "Cormier, Jonathan" <jcormier@criticallink.com> - 2015-09-25 20:40 +0200
  [PATCH  V1 6/6] ASoC: tlv320aic26: Change Capture Mute to Capture Switch to match alsa documentation. "Cormier, Jonathan" <jcormier@criticallink.com> - 2015-09-25 20:40 +0200
  [PATCH  V1 5/6] ASoC: tlv320aic26: hw_params was unintentionally clearing AIC26 master mode "Cormier, Jonathan" <jcormier@criticallink.com> - 2015-09-25 20:40 +0200
  [PATCH  V1 2/6] ASoC: tlv320aic26: Fix module autoload "Cormier, Jonathan" <jcormier@criticallink.com> - 2015-09-25 20:40 +0200
  [PATCH  V1 3/6] ASoC: tlv320aic26: Make SND_SOC_TLV320AIC26 user-visible "Cormier, Jonathan" <jcormier@criticallink.com> - 2015-09-25 20:40 +0200
  [PATCH  V1 4/6] ASoC: tlv320aic26: Fix regmap by setting reg_defaults and reg_stride "Cormier, Jonathan" <jcormier@criticallink.com> - 2015-09-25 20:40 +0200
  Re: [PATCH V1 0/6] ASoC: tlv320aic26: Add device tree support and bug  fixes Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-09-30 12:50 +0200

csiph-web