aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMichael Trimarchi <michael@panicking.kicks-ass.org>2009-01-29 14:27:35 +0000
committerAndy Green <agreen@octopus.localdomain>2009-01-29 14:27:35 +0000
commit63ff419a86fada0561acbe80ef9adb5857f5ce5c (patch)
tree2b54d50fc57c937c81eb47ceed70201e052d9245 /sound
parentd38ff30d88adbe51d50e0f4e66a819b31bd3b234 (diff)
Fix the registration of sound subsystem. This patch doesn't fix the
audio volume. Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm8753.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 5c375cfa90d..9ff02cab788 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1451,7 +1451,15 @@ static const struct snd_soc_dai wm8753_all_dai[] = {
},
};
-struct snd_soc_dai wm8753_dai[2];
+struct snd_soc_dai wm8753_dai[2] = {
+ {
+ .name = "dummy1"
+ },
+ {
+ .name = "dummy2"
+ },
+};
+
EXPORT_SYMBOL_GPL(wm8753_dai);
static void wm8753_set_dai_mode(struct snd_soc_codec *codec, unsigned int mode)
@@ -1647,6 +1655,7 @@ static int wm8753_i2c_probe(struct i2c_client *i2c,
/* codec->control_data must be set before call to wm8753_init */
i2c_set_clientdata(i2c, codec);
codec->control_data = i2c;
+ wm8753_dai->dev = &i2c->dev;
ret = wm8753_init(socdev);
if (ret < 0) {
@@ -1731,6 +1740,7 @@ static int __devinit wm8753_spi_probe(struct spi_device *spi)
int ret;
codec->control_data = spi;
+ wm8753_dai->dev = &spi->dev;
ret = wm8753_init(socdev);
if (ret < 0)
@@ -1803,6 +1813,7 @@ static int wm8753_probe(struct platform_device *pdev)
codec->private_data = wm8753;
socdev->codec = codec;
+
mutex_init(&codec->mutex);
INIT_LIST_HEAD(&codec->dapm_widgets);
INIT_LIST_HEAD(&codec->dapm_paths);
@@ -1819,17 +1830,19 @@ static int wm8753_probe(struct platform_device *pdev)
if (setup->spi) {
codec->hw_write = (hw_write_t)wm8753_spi_write;
ret = spi_register_driver(&wm8753_spi_driver);
- if (ret != 0)
+ if (ret != 0) {
printk(KERN_ERR "can't add spi driver");
+ goto err;
+ }
}
#endif
- if (ret != 0) {
- printk(KERN_ERR "can't add codec bus driver\n");
- kfree(codec->private_data);
- kfree(codec);
- }
return ret;
+err:
+ kfree(codec->private_data);
+ kfree(codec);
+ return ret;
+
}
/*