summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-10-20 18:32:59 +0800
committerMax Krummenacher <max.krummenacher@toradex.com>2013-01-21 10:49:43 +0100
commitd51af79dc255be3833cab5019428e7c50f22ce92 (patch)
tree08b404ff3d9ece63868f44eea6454e6182fc2341 /sound/soc
parent978816737293866010aff5a65a2d9dc7ecc86b02 (diff)
ASoC: Set sgtl5000->ldo in ldo_regulator_register
Otherwise calling ldo_regulator_remove() does not unregister regulator and free memories. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/sgtl5000.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 3637a62ddeb4..83950022b96e 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -806,6 +806,7 @@ static int ldo_regulator_register(struct snd_soc_codec *codec,
int voltage)
{
struct ldo_regulator *ldo;
+ struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec);
ldo = kzalloc(sizeof(struct ldo_regulator), GFP_KERNEL);
@@ -840,6 +841,7 @@ static int ldo_regulator_register(struct snd_soc_codec *codec,
return ret;
}
+ sgtl5000->ldo = ldo;
return 0;
}