aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8731.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8731.c')
-rw-r--r--sound/soc/codecs/wm8731.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 76b4361e9b80..f76b6fc6766a 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -22,6 +22,7 @@
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/regulator/consumer.h> 23#include <linux/regulator/consumer.h>
24#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
25#include <linux/of_device.h>
25#include <sound/core.h> 26#include <sound/core.h>
26#include <sound/pcm.h> 27#include <sound/pcm.h>
27#include <sound/pcm_params.h> 28#include <sound/pcm_params.h>
@@ -607,6 +608,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8731 = {
607 .num_dapm_routes = ARRAY_SIZE(wm8731_intercon), 608 .num_dapm_routes = ARRAY_SIZE(wm8731_intercon),
608}; 609};
609 610
611static const struct of_device_id wm8731_of_match[] = {
612 { .compatible = "wlf,wm8731", },
613 { }
614};
615
616MODULE_DEVICE_TABLE(of, wm8731_of_match);
617
610#if defined(CONFIG_SPI_MASTER) 618#if defined(CONFIG_SPI_MASTER)
611static int __devinit wm8731_spi_probe(struct spi_device *spi) 619static int __devinit wm8731_spi_probe(struct spi_device *spi)
612{ 620{
@@ -638,6 +646,7 @@ static struct spi_driver wm8731_spi_driver = {
638 .driver = { 646 .driver = {
639 .name = "wm8731", 647 .name = "wm8731",
640 .owner = THIS_MODULE, 648 .owner = THIS_MODULE,
649 .of_match_table = wm8731_of_match,
641 }, 650 },
642 .probe = wm8731_spi_probe, 651 .probe = wm8731_spi_probe,
643 .remove = __devexit_p(wm8731_spi_remove), 652 .remove = __devexit_p(wm8731_spi_remove),
@@ -682,6 +691,7 @@ static struct i2c_driver wm8731_i2c_driver = {
682 .driver = { 691 .driver = {
683 .name = "wm8731", 692 .name = "wm8731",
684 .owner = THIS_MODULE, 693 .owner = THIS_MODULE,
694 .of_match_table = wm8731_of_match,
685 }, 695 },
686 .probe = wm8731_i2c_probe, 696 .probe = wm8731_i2c_probe,
687 .remove = __devexit_p(wm8731_i2c_remove), 697 .remove = __devexit_p(wm8731_i2c_remove),