alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/10] ASoC: Convert 88pm860x-codec to devm_kzalloc()
@ 2011-12-26 12:48 Axel Lin
  2011-12-26 12:50 ` [PATCH 02/10] ASoC: Convert ad1836 " Axel Lin
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Axel Lin @ 2011-12-26 12:48 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Haojian Zhuang, Liam Girdwood

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/codecs/88pm860x-codec.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c
index 99ca53c..9fd3b68 100644
--- a/sound/soc/codecs/88pm860x-codec.c
+++ b/sound/soc/codecs/88pm860x-codec.c
@@ -1430,7 +1430,8 @@ static int __devinit pm860x_codec_probe(struct platform_device *pdev)
 	struct resource *res;
 	int i, ret;
 
-	pm860x = kzalloc(sizeof(struct pm860x_priv), GFP_KERNEL);
+	pm860x = devm_kzalloc(&pdev->dev, sizeof(struct pm860x_priv),
+			      GFP_KERNEL);
 	if (pm860x == NULL)
 		return -ENOMEM;
 
@@ -1459,17 +1460,13 @@ static int __devinit pm860x_codec_probe(struct platform_device *pdev)
 
 out:
 	platform_set_drvdata(pdev, NULL);
-	kfree(pm860x);
 	return -EINVAL;
 }
 
 static int __devexit pm860x_codec_remove(struct platform_device *pdev)
 {
-	struct pm860x_priv *pm860x = platform_get_drvdata(pdev);
-
 	snd_soc_unregister_codec(&pdev->dev);
 	platform_set_drvdata(pdev, NULL);
-	kfree(pm860x);
 	return 0;
 }
 
-- 
1.7.5.4

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

end of thread, other threads:[~2011-12-28 17:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-26 12:48 [PATCH 01/10] ASoC: Convert 88pm860x-codec to devm_kzalloc() Axel Lin
2011-12-26 12:50 ` [PATCH 02/10] ASoC: Convert ad1836 " Axel Lin
2011-12-28 17:22   ` Mark Brown
2011-12-26 12:51 ` [PATCH 03/10] ASoC: Convert ad193x " Axel Lin
2011-12-26 12:52 ` [PATCH 04/10] ASoC: Convert adau1373 " Axel Lin
2011-12-26 12:53 ` [PATCH 05/10] ASoC: Convert adau1701 " Axel Lin
2011-12-26 12:54 ` [PATCH 06/10] ASoC: Convert da7210 " Axel Lin
2011-12-27 12:58   ` Mark Brown
2011-12-26 12:55 ` [PATCH 07/10] ASoC: Convert jz4740 " Axel Lin
2011-12-26 12:56 ` [PATCH 08/10] ASoC: Convert lm4857 " Axel Lin
2011-12-27 12:59   ` Mark Brown
2011-12-26 12:57 ` [PATCH 09/10] ASoC: Convert tlv320aic32x4 " Axel Lin
2011-12-26 12:58 ` [PATCH 10/10] ASoC: Convert uda1380 " Axel Lin
2011-12-27 12:59   ` Mark Brown
2011-12-27 12:58 ` [PATCH 01/10] ASoC: Convert 88pm860x-codec " Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).