Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Haojian Zhuang <haojian.zhuang@gmail.com>
Subject: [PATCH 4/5] ASoC: pxa: Convert to devm_snd_soc_register_platform
Date: Thu, 27 Aug 2015 09:13:46 +0800	[thread overview]
Message-ID: <1440638026.18698.6.camel@ingics.com> (raw)
In-Reply-To: <1440637769.18698.1.camel@ingics.com>

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/pxa/mmp-pcm.c    | 9 +--------
 sound/soc/pxa/pxa2xx-pcm.c | 9 +--------
 2 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/sound/soc/pxa/mmp-pcm.c b/sound/soc/pxa/mmp-pcm.c
index 1eb45dc..51e790d 100644
--- a/sound/soc/pxa/mmp-pcm.c
+++ b/sound/soc/pxa/mmp-pcm.c
@@ -232,13 +232,7 @@ static int mmp_pcm_probe(struct platform_device *pdev)
 		mmp_pcm_hardware[SNDRV_PCM_STREAM_CAPTURE].period_bytes_max =
 						pdata->period_max_capture;
 	}
-	return snd_soc_register_platform(&pdev->dev, &mmp_soc_platform);
-}
-
-static int mmp_pcm_remove(struct platform_device *pdev)
-{
-	snd_soc_unregister_platform(&pdev->dev);
-	return 0;
+	return devm_snd_soc_register_platform(&pdev->dev, &mmp_soc_platform);
 }
 
 static struct platform_driver mmp_pcm_driver = {
@@ -247,7 +241,6 @@ static struct platform_driver mmp_pcm_driver = {
 	},
 
 	.probe = mmp_pcm_probe,
-	.remove = mmp_pcm_remove,
 };
 
 module_platform_driver(mmp_pcm_driver);
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c
index a51c9da..831ee37 100644
--- a/sound/soc/pxa/pxa2xx-pcm.c
+++ b/sound/soc/pxa/pxa2xx-pcm.c
@@ -124,13 +124,7 @@ static struct snd_soc_platform_driver pxa2xx_soc_platform = {
 
 static int pxa2xx_soc_platform_probe(struct platform_device *pdev)
 {
-	return snd_soc_register_platform(&pdev->dev, &pxa2xx_soc_platform);
-}
-
-static int pxa2xx_soc_platform_remove(struct platform_device *pdev)
-{
-	snd_soc_unregister_platform(&pdev->dev);
-	return 0;
+	return devm_snd_soc_register_platform(&pdev->dev, &pxa2xx_soc_platform);
 }
 
 #ifdef CONFIG_OF
@@ -147,7 +141,6 @@ static struct platform_driver pxa_pcm_driver = {
 	},
 
 	.probe = pxa2xx_soc_platform_probe,
-	.remove = pxa2xx_soc_platform_remove,
 };
 
 module_platform_driver(pxa_pcm_driver);
-- 
2.1.0

  parent reply	other threads:[~2015-08-27  1:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27  1:09 [PATCH 1/5] ASoC: au1x: Convert to devm_snd_soc_register_platform Axel Lin
2015-08-27  1:11 ` [PATCH 2/5] ASoC: blackfin: " Axel Lin
2015-08-28 17:44   ` Applied "ASoC: blackfin: Convert to devm_snd_soc_register_platform" to the asoc tree Mark Brown
2015-08-27  1:12 ` [PATCH 3/5] ASoC: nuc900: Convert to devm_snd_soc_register_platform Axel Lin
2015-08-28 17:44   ` Applied "ASoC: nuc900: Convert to devm_snd_soc_register_platform" to the asoc tree Mark Brown
2015-08-27  1:13 ` Axel Lin [this message]
2015-08-28 17:44   ` Applied "ASoC: pxa: " Mark Brown
2015-08-27  1:14 ` [PATCH 5/5] ASoC: txx9: Convert to devm_snd_soc_register_platform Axel Lin
2015-08-28 17:44   ` Applied "ASoC: txx9: Convert to devm_snd_soc_register_platform" to the asoc tree Mark Brown
2015-08-28 17:44 ` Applied "ASoC: au1x: " Mark Brown
2015-08-30  6:24 ` [PATCH 1/5] ASoC: au1x: Convert to devm_snd_soc_register_platform Manuel Lauss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440638026.18698.6.camel@ingics.com \
    --to=axel.lin@ingics.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=lgirdwood@gmail.com \
    --cc=robert.jarzmik@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox