mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 12:43:55 +08:00
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>
This commit is contained in:
parent
ff39dbe935
commit
5b13de7aa7
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user