public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Set sgtl5000->ldo in ldo_regulator_register
@ 2011-10-20 10:32 Axel Lin
  2011-10-20 10:49 ` Wolfram Sang
  2011-10-21  8:56 ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2011-10-20 10:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Zeng Zhaoming, Wolfram Sang, Liam Girdwood, Mark Brown,
	alsa-devel

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;
 }
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: Set sgtl5000->ldo in ldo_regulator_register
  2011-10-20 10:32 [PATCH] ASoC: Set sgtl5000->ldo in ldo_regulator_register Axel Lin
@ 2011-10-20 10:49 ` Wolfram Sang
  2011-10-20 16:53   ` Girdwood, Liam
  2011-10-21  8:56 ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2011-10-20 10:49 UTC (permalink / raw)
  To: Axel Lin
  Cc: linux-kernel, Zeng Zhaoming, Liam Girdwood, Mark Brown,
	alsa-devel, Dong Aisheng

[-- Attachment #1: Type: text/plain, Size: 552 bytes --]

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.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: Set sgtl5000->ldo in ldo_regulator_register
  2011-10-20 10:49 ` Wolfram Sang
@ 2011-10-20 16:53   ` Girdwood, Liam
  0 siblings, 0 replies; 4+ messages in thread
From: Girdwood, Liam @ 2011-10-20 16:53 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Axel Lin, linux-kernel, Zeng Zhaoming, Mark Brown, alsa-devel,
	Dong Aisheng

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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: Set sgtl5000->ldo in ldo_regulator_register
  2011-10-20 10:32 [PATCH] ASoC: Set sgtl5000->ldo in ldo_regulator_register Axel Lin
  2011-10-20 10:49 ` Wolfram Sang
@ 2011-10-21  8:56 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-10-21  8:56 UTC (permalink / raw)
  To: Axel Lin
  Cc: linux-kernel, Zeng Zhaoming, Wolfram Sang, Liam Girdwood,
	alsa-devel

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.

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-21  8:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-20 10:32 [PATCH] ASoC: Set sgtl5000->ldo in ldo_regulator_register Axel Lin
2011-10-20 10:49 ` Wolfram Sang
2011-10-20 16:53   ` Girdwood, Liam
2011-10-21  8:56 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox