All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [PATCH 02/16] ASoC: au1x: ac97c: use devm_snd_soc_register_component()
Date: Fri, 7 Sep 2018 01:00:32 +0000	[thread overview]
Message-ID: <87pnxqruut.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87sh2mruw6.wl-kuninori.morimoto.gx@renesas.com>

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Now we have devm_snd_soc_register_component().
Let's use it instead of snd_soc_register_component().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/au1x/ac97c.c    | 4 +---
 sound/soc/au1x/i2sc.c     | 4 +---
 sound/soc/au1x/psc-ac97.c | 4 +---
 sound/soc/au1x/psc-i2s.c  | 4 +---
 4 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/sound/soc/au1x/ac97c.c b/sound/soc/au1x/ac97c.c
index 66d6c52..f1ddca2 100644
--- a/sound/soc/au1x/ac97c.c
+++ b/sound/soc/au1x/ac97c.c
@@ -275,7 +275,7 @@ static int au1xac97c_drvprobe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	ret = snd_soc_register_component(&pdev->dev, &au1xac97c_component,
+	ret = devm_snd_soc_register_component(&pdev->dev, &au1xac97c_component,
 					 &au1xac97c_dai_driver, 1);
 	if (ret)
 		return ret;
@@ -288,8 +288,6 @@ static int au1xac97c_drvremove(struct platform_device *pdev)
 {
 	struct au1xpsc_audio_data *ctx = platform_get_drvdata(pdev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	WR(ctx, AC97_ENABLE, EN_D);	/* clock off, disable */
 
 	ac97c_workdata = NULL;	/* MDEV */
diff --git a/sound/soc/au1x/i2sc.c b/sound/soc/au1x/i2sc.c
index 450c842..b35b079 100644
--- a/sound/soc/au1x/i2sc.c
+++ b/sound/soc/au1x/i2sc.c
@@ -264,7 +264,7 @@ static int au1xi2s_drvprobe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, ctx);
 
-	return snd_soc_register_component(&pdev->dev, &au1xi2s_component,
+	return devm_snd_soc_register_component(&pdev->dev, &au1xi2s_component,
 					  &au1xi2s_dai_driver, 1);
 }
 
@@ -272,8 +272,6 @@ static int au1xi2s_drvremove(struct platform_device *pdev)
 {
 	struct au1xpsc_audio_data *ctx = platform_get_drvdata(pdev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	WR(ctx, I2S_ENABLE, EN_D);	/* clock off, disable */
 
 	return 0;
diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c
index a2050ae..712c386 100644
--- a/sound/soc/au1x/psc-ac97.c
+++ b/sound/soc/au1x/psc-ac97.c
@@ -417,7 +417,7 @@ static int au1xpsc_ac97_drvprobe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	ret = snd_soc_register_component(&pdev->dev, &au1xpsc_ac97_component,
+	ret = devm_snd_soc_register_component(&pdev->dev, &au1xpsc_ac97_component,
 					 &wd->dai_drv, 1);
 	if (ret)
 		return ret;
@@ -430,8 +430,6 @@ static int au1xpsc_ac97_drvremove(struct platform_device *pdev)
 {
 	struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	/* disable PSC completely */
 	__raw_writel(0, AC97_CFG(wd));
 	wmb(); /* drain writebuffer */
diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c
index e6eec08..33d90aa 100644
--- a/sound/soc/au1x/psc-i2s.c
+++ b/sound/soc/au1x/psc-i2s.c
@@ -343,7 +343,7 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, wd);
 
-	return snd_soc_register_component(&pdev->dev, &au1xpsc_i2s_component,
+	return devm_snd_soc_register_component(&pdev->dev, &au1xpsc_i2s_component,
 					  &wd->dai_drv, 1);
 }
 
@@ -351,8 +351,6 @@ static int au1xpsc_i2s_drvremove(struct platform_device *pdev)
 {
 	struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	__raw_writel(0, I2S_CFG(wd));
 	wmb(); /* drain writebuffer */
 	__raw_writel(PSC_CTRL_DISABLE, PSC_CTRL(wd));
-- 
2.7.4

  parent reply	other threads:[~2018-09-07  1:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07  0:59 [PATCH 00/16] ASoC: use devm_snd_soc_register_component() Kuninori Morimoto
2018-09-07  1:00 ` [PATCH 01/16] ASoC: atmel_ssc_dai: " Kuninori Morimoto
2018-09-10 14:22   ` Applied "ASoC: atmel_ssc_dai: use devm_snd_soc_register_component()" to the asoc tree Mark Brown
2018-09-07  1:00 ` Kuninori Morimoto [this message]
2018-09-10 13:59   ` [PATCH 02/16] ASoC: au1x: ac97c: use devm_snd_soc_register_component() Mark Brown
2018-09-07  1:00 ` [PATCH 03/16] ASoC: bcm: " Kuninori Morimoto
2018-09-10 14:22   ` Applied "ASoC: bcm: use devm_snd_soc_register_component()" to the asoc tree Mark Brown
2018-09-07  1:01 ` [PATCH 04/16] ASoC: cirrus: use devm_snd_soc_register_component() Kuninori Morimoto
2018-09-10 14:06   ` Mark Brown
2018-09-11  0:08     ` Kuninori Morimoto
2018-09-07  1:01 ` [PATCH 05/16] ASoC: hdac_hda: " Kuninori Morimoto
2018-09-10 14:22   ` Applied "ASoC: hdac_hda: use devm_snd_soc_register_component()" to the asoc tree Mark Brown
2018-09-07  1:01 ` [PATCH 06/16] ASoC: rt5668: use devm_snd_soc_register_component() Kuninori Morimoto
2018-09-10 14:08   ` Mark Brown
2018-09-11  0:09     ` Kuninori Morimoto
2018-09-10 14:22   ` Applied "ASoC: rt5668: use devm_snd_soc_register_component()" to the asoc tree Mark Brown
2018-09-07  1:01 ` [PATCH 07/16] ASoC: tscs454: use devm_snd_soc_register_component() Kuninori Morimoto
2018-09-10 14:21   ` Applied "ASoC: tscs454: use devm_snd_soc_register_component()" to the asoc tree Mark Brown
2018-09-07  1:02 ` [PATCH 08/16] ASoC: davinci: use devm_snd_soc_register_component() Kuninori Morimoto
2018-09-07  1:02 ` [PATCH 09/16] ASoC: fsl: " Kuninori Morimoto
2018-09-07  1:02 ` [PATCH 10/16] ASoC: nuc900: " Kuninori Morimoto
2018-09-10 14:21   ` Applied "ASoC: nuc900: use devm_snd_soc_register_component()" to the asoc tree Mark Brown
2018-09-07  1:02 ` [PATCH 11/16] ASoC: omap: use devm_snd_soc_register_component() Kuninori Morimoto
2018-09-10 14:21   ` Applied "ASoC: omap: use devm_snd_soc_register_component()" to the asoc tree Mark Brown
2018-09-07  1:03 ` [PATCH 12/16] ASoC: pxa: use devm_snd_soc_register_component() Kuninori Morimoto
2018-09-07  1:03 ` [PATCH 13/16] ASoC: sh: " Kuninori Morimoto
2018-09-10 14:21   ` Applied "ASoC: sh: use devm_snd_soc_register_component()" to the asoc tree Mark Brown
2018-09-07  1:03 ` [PATCH 14/16] ASoC: tegra: use devm_snd_soc_register_component() Kuninori Morimoto
2018-09-07  1:03 ` [PATCH 15/16] ASoC: txx9: " Kuninori Morimoto
2018-09-10 14:21   ` Applied "ASoC: txx9: use devm_snd_soc_register_component()" to the asoc tree Mark Brown
2018-09-07  1:04 ` [PATCH 16/16] ASoC: ux500: use devm_snd_soc_register_component() Kuninori Morimoto

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=87pnxqruut.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.