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 4/6] ASoC: fsl: Use devm_snd_dmaengine_pcm_register()
Date: Sun, 24 Nov 2013 14:21:00 +0100 [thread overview]
Message-ID: <1385299262-24304-4-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/fsl/fsl_spdif.c | 8 --------
sound/soc/fsl/fsl_ssi.c | 4 ----
sound/soc/fsl/imx-pcm-dma.c | 9 ++-------
sound/soc/fsl/imx-pcm.h | 5 -----
sound/soc/fsl/imx-ssi.c | 3 ---
5 files changed, 2 insertions(+), 27 deletions(-)
diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index 55193a5..4d075f1 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -1181,13 +1181,6 @@ static int fsl_spdif_probe(struct platform_device *pdev)
return ret;
}
-static int fsl_spdif_remove(struct platform_device *pdev)
-{
- imx_pcm_dma_exit(pdev);
-
- return 0;
-}
-
static const struct of_device_id fsl_spdif_dt_ids[] = {
{ .compatible = "fsl,imx35-spdif", },
{}
@@ -1201,7 +1194,6 @@ static struct platform_driver fsl_spdif_driver = {
.of_match_table = fsl_spdif_dt_ids,
},
.probe = fsl_spdif_probe,
- .remove = fsl_spdif_remove,
};
module_platform_driver(fsl_spdif_driver);
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index fb8f52a..3df0318 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -1109,8 +1109,6 @@ done:
return 0;
error_dai:
- if (ssi_private->ssi_on_imx)
- imx_pcm_dma_exit(pdev);
snd_soc_unregister_component(&pdev->dev);
error_dev:
@@ -1132,8 +1130,6 @@ static int fsl_ssi_remove(struct platform_device *pdev)
if (!ssi_private->new_binding)
platform_device_unregister(ssi_private->pdev);
- if (ssi_private->ssi_on_imx)
- imx_pcm_dma_exit(pdev);
snd_soc_unregister_component(&pdev->dev);
device_remove_file(&pdev->dev, &ssi_private->dev_attr);
if (ssi_private->ssi_on_imx)
diff --git a/sound/soc/fsl/imx-pcm-dma.c b/sound/soc/fsl/imx-pcm-dma.c
index aee2307..c5e47f8 100644
--- a/sound/soc/fsl/imx-pcm-dma.c
+++ b/sound/soc/fsl/imx-pcm-dma.c
@@ -61,16 +61,11 @@ static const struct snd_dmaengine_pcm_config imx_dmaengine_pcm_config = {
int imx_pcm_dma_init(struct platform_device *pdev)
{
- return snd_dmaengine_pcm_register(&pdev->dev, &imx_dmaengine_pcm_config,
+ return devm_snd_dmaengine_pcm_register(&pdev->dev,
+ &imx_dmaengine_pcm_config,
SND_DMAENGINE_PCM_FLAG_NO_RESIDUE |
SND_DMAENGINE_PCM_FLAG_COMPAT);
}
EXPORT_SYMBOL_GPL(imx_pcm_dma_init);
-void imx_pcm_dma_exit(struct platform_device *pdev)
-{
- snd_dmaengine_pcm_unregister(&pdev->dev);
-}
-EXPORT_SYMBOL_GPL(imx_pcm_dma_exit);
-
MODULE_LICENSE("GPL");
diff --git a/sound/soc/fsl/imx-pcm.h b/sound/soc/fsl/imx-pcm.h
index 5d5b733..c79cb27 100644
--- a/sound/soc/fsl/imx-pcm.h
+++ b/sound/soc/fsl/imx-pcm.h
@@ -40,16 +40,11 @@ struct imx_pcm_fiq_params {
#if IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_DMA)
int imx_pcm_dma_init(struct platform_device *pdev);
-void imx_pcm_dma_exit(struct platform_device *pdev);
#else
static inline int imx_pcm_dma_init(struct platform_device *pdev)
{
return -ENODEV;
}
-
-static inline void imx_pcm_dma_exit(struct platform_device *pdev)
-{
-}
#endif
#if IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_FIQ)
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index f5f248c..cc7376f 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -624,9 +624,6 @@ static int imx_ssi_remove(struct platform_device *pdev)
{
struct imx_ssi *ssi = platform_get_drvdata(pdev);
- if (!ssi->dma_init)
- imx_pcm_dma_exit(pdev);
-
if (!ssi->fiq_init)
imx_pcm_fiq_exit(pdev);
--
1.8.0
next prev parent reply other threads:[~2013-11-24 13:20 UTC|newest]
Thread overview: 16+ 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 ` [PATCH 2/6] ASoC: atmel: Use devm_snd_dmaengine_pcm_register() Lars-Peter Clausen
2013-11-25 10:36 ` 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 ` Lars-Peter Clausen [this message]
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
-- strict thread matches above, loose matches on Subject: below --
2013-11-28 7:50 Lars-Peter Clausen
2013-11-28 7:50 ` [PATCH 4/6] ASoC: fsl: Use devm_snd_dmaengine_pcm_register() Lars-Peter Clausen
2013-12-02 11:49 ` Mark Brown
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-4-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).