提交 5b13de7a 编写于 作者: A Axel Lin 提交者: 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: NAxel Lin <axel.lin@gmail.com>
Acked-by: NWolfram Sang <w.sang@pengutronix.de>
Acked-by: NLiam Girdwood <lrg@ti.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 ff39dbe9
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册