summaryrefslogtreecommitdiffstats
path: root/sound/soc/spear/spear_pcm.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2013-12-10 12:35:24 -0700
committerMark Brown <broonie@linaro.org>2013-12-18 18:55:02 +0000
commitede38884ac25ed78e43f3480056670963a9980f0 (patch)
tree9c9c434b532a9f0faf4b248b1d2d6c8afcb40785 /sound/soc/spear/spear_pcm.c
parentd71b3ef44f9e5cfda2499768f6420b784845af06 (diff)
downloadblackbird-op-linux-ede38884ac25ed78e43f3480056670963a9980f0.tar.gz
blackbird-op-linux-ede38884ac25ed78e43f3480056670963a9980f0.zip
ASoC: SPEAr: get rid of spear-pcm-audio struct device
Modify the SPEAr PCM driver so that it's a utility library that can be registered on each DAI, rather than a separate struct device. This is more in line with how many recent DT-converted platforms operate, and avoids the need for yet another struct device. This is also required as a pre-cursor to removing spear_pcm_request_chan(). Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/spear/spear_pcm.c')
-rw-r--r--sound/soc/spear/spear_pcm.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/sound/soc/spear/spear_pcm.c b/sound/soc/spear/spear_pcm.c
index 9a02141666ea..f288724961da 100644
--- a/sound/soc/spear/spear_pcm.c
+++ b/sound/soc/spear/spear_pcm.c
@@ -18,6 +18,7 @@
#include <sound/pcm.h>
#include <sound/soc.h>
#include <sound/spear_dma.h>
+#include "spear_pcm.h"
static const struct snd_pcm_hardware spear_pcm_hardware = {
.info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -47,26 +48,15 @@ static const struct snd_dmaengine_pcm_config spear_dmaengine_pcm_config = {
.prealloc_buffer_size = 16 * 1024,
};
-static int spear_soc_platform_probe(struct platform_device *pdev)
+int devm_spear_pcm_platform_register(struct device *dev)
{
- return devm_snd_dmaengine_pcm_register(&pdev->dev,
+ return devm_snd_dmaengine_pcm_register(dev,
&spear_dmaengine_pcm_config,
SND_DMAENGINE_PCM_FLAG_NO_DT |
SND_DMAENGINE_PCM_FLAG_COMPAT);
}
-
-static struct platform_driver spear_pcm_driver = {
- .driver = {
- .name = "spear-pcm-audio",
- .owner = THIS_MODULE,
- },
-
- .probe = spear_soc_platform_probe,
-};
-
-module_platform_driver(spear_pcm_driver);
+EXPORT_SYMBOL_GPL(devm_spear_pcm_platform_register);
MODULE_AUTHOR("Rajeev Kumar <rajeev-dlh.kumar@st.com>");
MODULE_DESCRIPTION("SPEAr PCM DMA module");
MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:spear-pcm-audio");
OpenPOWER on IntegriCloud