[alsa-devel] [PATCH] 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 --- 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 3637a62..8395002 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; }
On Thu, Oct 20, 2011 at 06:32:59PM +0800, Axel Lin wrote:
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
BTW I think it is better to CC "Dong Aisheng B29396@freescale.com" instead of Zeng Zhaoming; he was lately working with sgtl5000.
On 20 October 2011 11:49, Wolfram Sang w.sang@pengutronix.de wrote:
On Thu, Oct 20, 2011 at 06:32:59PM +0800, Axel Lin wrote:
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
BTW I think it is better to CC "Dong Aisheng B29396@freescale.com" instead of Zeng Zhaoming; he was lately working with sgtl5000.
Acked-by: Liam Girdwood lrg@ti.com
participants (4)
-
Axel Lin
-
Girdwood, Liam
-
Mark Brown
-
Wolfram Sang