All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: ak4104: provide a module device table
@ 2013-09-16 16:14 Daniel Mack
  2013-09-16 23:45 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Mack @ 2013-09-16 16:14 UTC (permalink / raw)
  To: alsa-devel; +Cc: broonie, Daniel Mack

Provide a module device table for the SPI subsystem, so the driver can
be autoloaded by the SPI core.

While at it, get rid of an unnecessary #define.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 sound/soc/codecs/ak4104.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/ak4104.c b/sound/soc/codecs/ak4104.c
index 71059c0..b4819dc 100644
--- a/sound/soc/codecs/ak4104.c
+++ b/sound/soc/codecs/ak4104.c
@@ -45,8 +45,6 @@
 #define AK4104_TX_TXE			(1 << 0)
 #define AK4104_TX_V			(1 << 1)
 
-#define DRV_NAME "ak4104-codec"
-
 struct ak4104_private {
 	struct regmap *regmap;
 };
@@ -291,12 +289,19 @@ static const struct of_device_id ak4104_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ak4104_of_match);
 
+static const struct spi_device_id ak4104_id_table[] = {
+	{ "ak4104", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(spi, ak4104_id_table);
+
 static struct spi_driver ak4104_spi_driver = {
 	.driver  = {
-		.name   = DRV_NAME,
+		.name   = "ak4104",
 		.owner  = THIS_MODULE,
 		.of_match_table = ak4104_of_match,
 	},
+	.id_table = ak4104_id_table,
 	.probe  = ak4104_spi_probe,
 	.remove = ak4104_spi_remove,
 };
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: ak4104: provide a module device table
  2013-09-16 16:14 [PATCH] ASoC: ak4104: provide a module device table Daniel Mack
@ 2013-09-16 23:45 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-09-16 23:45 UTC (permalink / raw)
  To: Daniel Mack; +Cc: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 185 bytes --]

On Mon, Sep 16, 2013 at 06:14:20PM +0200, Daniel Mack wrote:
> Provide a module device table for the SPI subsystem, so the driver can
> be autoloaded by the SPI core.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-16 23:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-16 16:14 [PATCH] ASoC: ak4104: provide a module device table Daniel Mack
2013-09-16 23:45 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.