ASoC: Set sgtl5000->ldo in ldo_regulator_register
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- sound/soc/codecs/sgtl5000.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
sound/soc/codecs/sgtl5000.c +2 -0
@@ -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 ; }
Signature · 1 line
1.7.5.4
Quoted 4 lines · Axel Lin
Otherwise calling
ldo_regulator_remove()does not unregister regulator and free memories.Signed-off-by Axel Lin <[email protected]>
Acked-by Wolfram Sang <[email protected]>
BTW I think it is better to CC "Dong Aisheng <[email protected]>" instead of Zeng Zhaoming; he was lately working with sgtl5000.
Signature · 2 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ |
Girdwood, Liam
Acked-byQuoted 11 lines · Wolfram Sang
Quoted 4 lines · Axel Lin
Otherwise calling
ldo_regulator_remove()does not unregister regulator and free memories.Signed-off-by Axel Lin <[email protected]>Acked-by Wolfram Sang <[email protected]>BTW I think it is better to CC "Dong Aisheng <[email protected]>" instead of Zeng Zhaoming; he was lately working with sgtl5000.
Acked-by Liam Girdwood <[email protected]>
Mark Brown
AppliedQuoted 2 lines · Axel Lin
Otherwise calling
ldo_regulator_remove()does not unregister regulator and free memories.
Applied, thanks.