devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ALSA: ASoc: spdif_transciever: Add DT support
@ 2013-04-19 13:38 Michal Bachraty
  2013-04-19 17:36 ` Daniel Mack
  2013-04-23 13:49 ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Michal Bachraty @ 2013-04-19 13:38 UTC (permalink / raw)
  To: perex, tiwai, grant.likely, rob.herring, alsa-devel, linux-kernel,
	devicetree-discuss
  Cc: marek.belisko, broonie, lgirdwood, Michal Bachraty

Add devicetree support for this dummy audio soc driver.

Signed-off-by: Michal Bachraty <michal.bachraty@streamunlimited.com>
---
 sound/soc/codecs/spdif_transciever.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/soc/codecs/spdif_transciever.c b/sound/soc/codecs/spdif_transciever.c
index 112a49d..4c8c295 100644
--- a/sound/soc/codecs/spdif_transciever.c
+++ b/sound/soc/codecs/spdif_transciever.c
@@ -20,6 +20,7 @@
 #include <sound/soc.h>
 #include <sound/pcm.h>
 #include <sound/initval.h>
+#include <linux/of.h>
 
 #define DRV_NAME "spdif-dit"
 
@@ -52,12 +53,21 @@ static int spdif_dit_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static const struct of_device_id spdif_dit_dt_ids[] = {
+	{ .compatible = DRV_NAME, },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, spdif_dits_dt_ids);
+#endif
+
 static struct platform_driver spdif_dit_driver = {
 	.probe		= spdif_dit_probe,
 	.remove		= spdif_dit_remove,
 	.driver		= {
 		.name	= DRV_NAME,
 		.owner	= THIS_MODULE,
+		.of_match_table = of_match_ptr(spdif_dit_dt_ids),
 	},
 };
 
-- 
1.7.9.5

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

end of thread, other threads:[~2013-04-23 14:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-19 13:38 [PATCH 1/2] ALSA: ASoc: spdif_transciever: Add DT support Michal Bachraty
2013-04-19 17:36 ` Daniel Mack
2013-04-23 14:02   ` Sebastian Hesselbarth
2013-04-23 13:49 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).