From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
alsa-devel@alsa-project.org,
Rajeev Kumar <rajeev-dlh.kumar@st.com>,
Ryan Mallon <rmallon@gmail.com>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
Timur Tabi <timur@tabi.org>,
H Hartley Sweeten <hsweeten@visionengravers.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Bo Shen <voice.shen@atmel.com>,
Markus Pargmann <mpa@pengutronix.de>,
Shawn Guo <shawn.guo@linaro.org>
Subject: [PATCH 2/6] ASoC: atmel: Use devm_snd_dmaengine_pcm_register()
Date: Sun, 24 Nov 2013 14:20:58 +0100 [thread overview]
Message-ID: <1385299262-24304-2-git-send-email-lars@metafoo.de> (raw)
In-Reply-To: <1385299262-24304-1-git-send-email-lars@metafoo.de>
Makes the code shorter.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
sound/soc/atmel/atmel-pcm-dma.c | 8 +-------
sound/soc/atmel/atmel-pcm.h | 4 ----
sound/soc/atmel/atmel_ssc_dai.c | 4 +---
3 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/sound/soc/atmel/atmel-pcm-dma.c b/sound/soc/atmel/atmel-pcm-dma.c
index 06082e5..7dbc0e9 100644
--- a/sound/soc/atmel/atmel-pcm-dma.c
+++ b/sound/soc/atmel/atmel-pcm-dma.c
@@ -129,17 +129,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,
+ return devm_snd_dmaengine_pcm_register(dev, &atmel_dmaengine_pcm_config,
SND_DMAENGINE_PCM_FLAG_NO_RESIDUE);
}
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.h b/sound/soc/atmel/atmel-pcm.h
index 12ae814..bb71069 100644
--- a/sound/soc/atmel/atmel-pcm.h
+++ b/sound/soc/atmel/atmel-pcm.h
@@ -105,15 +105,11 @@ static inline void atmel_pcm_pdc_platform_unregister(struct device *dev)
#if defined(CONFIG_SND_ATMEL_SOC_DMA) || \
defined(CONFIG_SND_ATMEL_SOC_DMA_MODULE)
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 8697ced..13aaa7d 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -792,9 +792,7 @@ static void asoc_ssc_exit(struct device *dev)
struct platform_device *pdev = to_platform_device(dev);
struct ssc_device *ssc = platform_get_drvdata(pdev);
- if (ssc->pdata->use_dma)
- atmel_pcm_dma_platform_unregister(dev);
- else
+ if (!ssc->pdata->use_dma)
atmel_pcm_pdc_platform_unregister(dev);
snd_soc_unregister_component(dev);
--
1.8.0
next prev parent reply other threads:[~2013-11-24 13:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-24 13:20 [PATCH 1/6] ASoC: Add resource managed snd_dmaengine_pcm_register() Lars-Peter Clausen
2013-11-24 13:20 ` Lars-Peter Clausen [this message]
2013-11-25 10:36 ` [PATCH 2/6] ASoC: atmel: Use devm_snd_dmaengine_pcm_register() Bo Shen
2013-11-25 10:41 ` Lars-Peter Clausen
2013-11-25 11:18 ` Lars-Peter Clausen
2013-11-24 13:20 ` [PATCH 3/6] ASoC: ep93xx: " Lars-Peter Clausen
2013-11-24 13:21 ` [PATCH 4/6] ASoC: fsl: " Lars-Peter Clausen
2013-11-24 13:21 ` [PATCH 5/6] ASoC: spear: Use devm_snd_dmaengine_pcm_register Lars-Peter Clausen
2013-11-25 4:14 ` Rajeev kumar
2013-11-24 13:21 ` [PATCH 6/6] ASoC: mxs: Use devm_snd_dmaengine_pcm_register() Lars-Peter Clausen
2013-11-25 17:19 ` [PATCH 1/6] ASoC: Add resource managed snd_dmaengine_pcm_register() Mark Brown
2013-11-25 17:42 ` Lars-Peter Clausen
2013-11-25 18:23 ` Mark Brown
2013-11-25 19:31 ` Lars-Peter Clausen
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=1385299262-24304-2-git-send-email-lars@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=fabio.estevam@freescale.com \
--cc=hsweeten@visionengravers.com \
--cc=lgirdwood@gmail.com \
--cc=mpa@pengutronix.de \
--cc=nicolas.ferre@atmel.com \
--cc=rajeev-dlh.kumar@st.com \
--cc=rmallon@gmail.com \
--cc=shawn.guo@linaro.org \
--cc=timur@tabi.org \
--cc=voice.shen@atmel.com \
/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;
as well as URLs for NNTP newsgroup(s).