summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorGraham Gower <graham.gower@gmail.com>2010-03-25 10:52:12 +1030
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-29 21:00:37 +0100
commitfb48e3c6a4d8888aff61fbf567aadac7d206e973 (patch)
tree3fba75703831f392034271f62b73484764ffc675 /sound/soc/soc-core.c
parenta8462bde78fdb77c8ede61e1af99617905a78ccf (diff)
downloadlinux-fb48e3c6a4d8888aff61fbf567aadac7d206e973.tar.bz2
ASoC: Fix passing platform_data to ac97 bus users and fix a leak
[The issue is an attempt to write the pdata without the AC97 device allocated when using ac97.c - also added a comment in soc-core.c for the special case for ac97. -- broonie] Signed-off-by: Graham Gower <graham.gower@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index c8b0556ef431..d0efd5eaaa0b 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1548,7 +1548,8 @@ int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid)
mutex_unlock(&codec->mutex);
return ret;
}
- if (card->dai_link[i].codec_dai->ac97_control) {
+ /* Check for codec->ac97 to handle the ac97.c fun */
+ if (card->dai_link[i].codec_dai->ac97_control && codec->ac97) {
snd_ac97_dev_add_pdata(codec->ac97,
card->dai_link[i].cpu_dai->ac97_pdata);
}