diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-10-20 06:32:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-21 04:55:43 -0400 |
commit | 5b13de7aa754eaa274fc9ab018191bcdcb21bc45 (patch) | |
tree | 7b72d30a4314d76e05779f3869b1720e621a1c0e /sound/soc | |
parent | ff39dbe93543d5d4118fddf247db48431f984648 (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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 3637a62ddeb..83950022b96 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, | |||
806 | int voltage) | 806 | int voltage) |
807 | { | 807 | { |
808 | struct ldo_regulator *ldo; | 808 | struct ldo_regulator *ldo; |
809 | struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec); | ||
809 | 810 | ||
810 | ldo = kzalloc(sizeof(struct ldo_regulator), GFP_KERNEL); | 811 | ldo = kzalloc(sizeof(struct ldo_regulator), GFP_KERNEL); |
811 | 812 | ||
@@ -840,6 +841,7 @@ static int ldo_regulator_register(struct snd_soc_codec *codec, | |||
840 | 841 | ||
841 | return ret; | 842 | return ret; |
842 | } | 843 | } |
844 | sgtl5000->ldo = ldo; | ||
843 | 845 | ||
844 | return 0; | 846 | return 0; |
845 | } | 847 | } |