lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

Commit 5b13de7a authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

ASoC: Set sgtl5000->ldo in ldo_regulator_register

Otherwise calling ldo_regulator_remove() does not unregister regulator
and free memories.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent ff39dbe9
...@@ -806,6 +806,7 @@ static int ldo_regulator_register(struct snd_soc_codec *codec, ...@@ -806,6 +806,7 @@ static int ldo_regulator_register(struct snd_soc_codec *codec,
int voltage) int voltage)
{ {
struct ldo_regulator *ldo; struct ldo_regulator *ldo;
struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec);
ldo = kzalloc(sizeof(struct ldo_regulator), GFP_KERNEL); ldo = kzalloc(sizeof(struct ldo_regulator), GFP_KERNEL);
...@@ -840,6 +841,7 @@ static int ldo_regulator_register(struct snd_soc_codec *codec, ...@@ -840,6 +841,7 @@ static int ldo_regulator_register(struct snd_soc_codec *codec,
return ret; return ret;
} }
sgtl5000->ldo = ldo;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment