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 v2 01/23] ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register()
Date: 28 Jun 2019 13:07:05 +0900	[thread overview]
Message-ID: <87a7e2tkx5.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87blyitky2.wl-kuninori.morimoto.gx@renesas.com>

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

We have devm_xxx version of snd_dmaengine_pcm_register,
let's use it.

This patch also removes related empty functions

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2

	- remove empty functions

 sound/soc/atmel/atmel-pcm-dma.c |  9 ++-------
 sound/soc/atmel/atmel-pcm-pdc.c |  5 -----
 sound/soc/atmel/atmel-pcm.h     |  8 --------
 sound/soc/atmel/atmel_ssc_dai.c | 11 -----------
 4 files changed, 2 insertions(+), 31 deletions(-)

diff --git a/sound/soc/atmel/atmel-pcm-dma.c b/sound/soc/atmel/atmel-pcm-dma.c
index 042e593..db67f5b 100644
--- a/sound/soc/atmel/atmel-pcm-dma.c
+++ b/sound/soc/atmel/atmel-pcm-dma.c
@@ -111,16 +111,11 @@ static const struct snd_dmaengine_pcm_config atmel_dmaengine_pcm_config = {
 
 int atmel_pcm_dma_platform_register(struct device *dev)
 {
-	return snd_dmaengine_pcm_register(dev, &atmel_dmaengine_pcm_config, 0);
+	return devm_snd_dmaengine_pcm_register(dev,
+					&atmel_dmaengine_pcm_config, 0);
 }
 EXPORT_SYMBOL(atmel_pcm_dma_platform_register);
 
-void atmel_pcm_dma_platform_unregister(struct device *dev)
-{
-	snd_dmaengine_pcm_unregister(dev);
-}
-EXPORT_SYMBOL(atmel_pcm_dma_platform_unregister);
-
 MODULE_AUTHOR("Bo Shen <voice.shen@atmel.com>");
 MODULE_DESCRIPTION("Atmel DMA based PCM module");
 MODULE_LICENSE("GPL");
diff --git a/sound/soc/atmel/atmel-pcm-pdc.c b/sound/soc/atmel/atmel-pcm-pdc.c
index 7e9aa70..ed095af 100644
--- a/sound/soc/atmel/atmel-pcm-pdc.c
+++ b/sound/soc/atmel/atmel-pcm-pdc.c
@@ -393,11 +393,6 @@ int atmel_pcm_pdc_platform_register(struct device *dev)
 }
 EXPORT_SYMBOL(atmel_pcm_pdc_platform_register);
 
-void atmel_pcm_pdc_platform_unregister(struct device *dev)
-{
-}
-EXPORT_SYMBOL(atmel_pcm_pdc_platform_unregister);
-
 MODULE_AUTHOR("Sedji Gaouaou <sedji.gaouaou@atmel.com>");
 MODULE_DESCRIPTION("Atmel PCM module");
 MODULE_LICENSE("GPL");
diff --git a/sound/soc/atmel/atmel-pcm.h b/sound/soc/atmel/atmel-pcm.h
index 5173c9b..2e64874 100644
--- a/sound/soc/atmel/atmel-pcm.h
+++ b/sound/soc/atmel/atmel-pcm.h
@@ -72,28 +72,20 @@ struct atmel_pcm_dma_params {
 
 #if IS_ENABLED(CONFIG_SND_ATMEL_SOC_PDC)
 int atmel_pcm_pdc_platform_register(struct device *dev);
-void atmel_pcm_pdc_platform_unregister(struct device *dev);
 #else
 static inline int atmel_pcm_pdc_platform_register(struct device *dev)
 {
 	return 0;
 }
-static inline void atmel_pcm_pdc_platform_unregister(struct device *dev)
-{
-}
 #endif
 
 #if IS_ENABLED(CONFIG_SND_ATMEL_SOC_DMA)
 int atmel_pcm_dma_platform_register(struct device *dev);
-void atmel_pcm_dma_platform_unregister(struct device *dev);
 #else
 static inline int atmel_pcm_dma_platform_register(struct device *dev)
 {
 	return 0;
 }
-static inline void atmel_pcm_dma_platform_unregister(struct device *dev)
-{
-}
 #endif
 
 #endif /* _ATMEL_PCM_H */
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index b66c778..6f89483 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -1012,16 +1012,6 @@ static int asoc_ssc_init(struct device *dev)
 	return 0;
 }
 
-static void asoc_ssc_exit(struct device *dev)
-{
-	struct ssc_device *ssc = dev_get_drvdata(dev);
-
-	if (ssc->pdata->use_dma)
-		atmel_pcm_dma_platform_unregister(dev);
-	else
-		atmel_pcm_pdc_platform_unregister(dev);
-}
-
 /**
  * atmel_ssc_set_audio - Allocate the specified SSC for audio use.
  */
@@ -1050,7 +1040,6 @@ void atmel_ssc_put_audio(int ssc_id)
 {
 	struct ssc_device *ssc = ssc_info[ssc_id].ssc;
 
-	asoc_ssc_exit(&ssc->pdev->dev);
 	ssc_free(ssc);
 }
 EXPORT_SYMBOL_GPL(atmel_ssc_put_audio);
-- 
2.7.4

  reply	other threads:[~2019-06-28  4:07 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28  4:06 [PATCH v2 00/23] ASoC: use devm_xxx Kuninori Morimoto
2019-06-28  4:07 ` Kuninori Morimoto [this message]
2019-06-28  9:45   ` [PATCH v2 01/23] ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register() Codrin.Ciubotariu
2019-06-28 16:56   ` Applied "ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register()" to the asoc tree Mark Brown
2019-06-28  4:07 ` [PATCH v2 02/23] ASoC: sunxi: sun4i-i2s.c: use devm_snd_dmaengine_pcm_register() Kuninori Morimoto
2019-06-28  4:07 ` [PATCH v2 03/23] ASoC: tegra: tegra_pcm.c: " Kuninori Morimoto
2019-06-28  4:08 ` [PATCH v2 04/23] ASoC: ux500: ux500_pcm.c: " Kuninori Morimoto
2019-06-28  4:08 ` [PATCH v2 05/23] ASoC: au1x: i2sc.c: use devm_snd_soc_register_component() Kuninori Morimoto
2019-06-28  4:08 ` [PATCH v2 06/23] ASoC: au1x: ac97c.c: " Kuninori Morimoto
2019-06-28  4:08 ` [PATCH v2 07/23] ASoC: au1x: psc-ac97.c: " Kuninori Morimoto
2019-07-02 12:39   ` Mark Brown
2019-07-03  0:36     ` Kuninori Morimoto
2019-06-28  4:08 ` [PATCH v2 08/23] ASoC: au1x: psc-i2s.c: " Kuninori Morimoto
2019-07-02 13:04   ` Applied "ASoC: au1x: psc-i2s.c: use devm_snd_soc_register_component()" to the asoc tree Mark Brown
2019-06-28  4:09 ` [PATCH v2 09/23] ASoC: cirrus: ep93xx-i2s.c: use devm_snd_soc_register_component() Kuninori Morimoto
2019-07-02 12:44   ` Mark Brown
2019-06-28  4:09 ` [PATCH v2 10/23] ASoC: cirrus: ep93xx-ac97.c: " Kuninori Morimoto
2019-06-28  4:09 ` [PATCH v2 11/23] ASoC: rt5682: " Kuninori Morimoto
2019-07-02 13:04   ` Applied "ASoC: rt5682: use devm_snd_soc_register_component()" to the asoc tree Mark Brown
2019-06-28  4:09 ` [PATCH v2 12/23] ASoC: ak4118: use devm_snd_soc_register_component() Kuninori Morimoto
2019-07-02 13:04   ` Applied "ASoC: ak4118: use devm_snd_soc_register_component()" to the asoc tree Mark Brown
2019-06-28  4:09 ` [PATCH v2 13/23] ASoC: cros_ec_codec: use devm_snd_soc_register_component() Kuninori Morimoto
2019-07-02 13:04   ` Applied "ASoC: cros_ec_codec: use devm_snd_soc_register_component()" to the asoc tree Mark Brown
2019-06-28  4:10 ` [PATCH v2 14/23] ASoC: fsl: imx-ssi.c: use devm_snd_soc_register_component() Kuninori Morimoto
2019-06-28  4:10 ` [PATCH v2 15/23] ASoC: fsl: mpc5200_psc_i2s.c: " Kuninori Morimoto
2019-06-28  4:10 ` [PATCH v2 16/23] ASoC: fsl: mpc5200_psc_ac97.c: " Kuninori Morimoto
2019-06-28  4:10 ` [PATCH v2 17/23] ASoC: pxa: pxa2xx-ac97.c: " Kuninori Morimoto
2019-07-02 13:04   ` Applied "ASoC: pxa: pxa2xx-ac97.c: use devm_snd_soc_register_component()" to the asoc tree Mark Brown
2019-06-28  4:10 ` [PATCH v2 18/23] ASoC: tegra: tegra20_i2s.c: use devm_snd_soc_register_component() Kuninori Morimoto
2019-07-02 12:45   ` Mark Brown
2019-06-28  4:10 ` [PATCH v2 19/23] ASoC: tegra: tegra20_spdif.c: " Kuninori Morimoto
2019-06-28  4:11 ` [PATCH v2 20/23] ASoC: tegra: tegra20_ac97.c: " Kuninori Morimoto
2019-06-28  4:11 ` [PATCH v2 21/23] ASoC: tegra: tegra30_i2s.c: " Kuninori Morimoto
2019-06-28  4:11 ` [PATCH v2 22/23] ASoC: ti: davinci-i2s.c: " Kuninori Morimoto
2019-06-28  4:11 ` [PATCH v2 23/23] ASoC: ux500: ux500_msp_dai.c: " 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=87a7e2tkx5.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.