summaryrefslogtreecommitdiff
path: root/sound/soc/omap/omap-mcpdm.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2014-04-16 15:46:14 +0300
committerMark Brown <broonie@linaro.org>2014-04-18 18:00:35 +0100
commit335b06515eda252b36aa9063596f740a903c1e35 (patch)
treec6dc0c5a4e8a93a69d7ec525b35fc70c733e9e0b /sound/soc/omap/omap-mcpdm.c
parentf6563b31fb4878fddc846d2012bcee9c5f260d11 (diff)
ASoC: omap-mcpdm: Bind the platform driver to the dai driver when loading
Use the same device for the platform driver when registering as the dai driver. This will enable us to clean up some DT booted cases. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/omap/omap-mcpdm.c')
-rw-r--r--sound/soc/omap/omap-mcpdm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index e984b0485e92..d8ebb52645a9 100644
--- a/sound/soc/omap/omap-mcpdm.c
+++ b/sound/soc/omap/omap-mcpdm.c
@@ -42,6 +42,7 @@
#include <sound/dmaengine_pcm.h>
#include "omap-mcpdm.h"
+#include "omap-pcm.h"
struct mcpdm_link_config {
u32 link_mask; /* channel mask for the direction */
@@ -462,6 +463,7 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
{
struct omap_mcpdm *mcpdm;
struct resource *res;
+ int ret;
mcpdm = devm_kzalloc(&pdev->dev, sizeof(struct omap_mcpdm), GFP_KERNEL);
if (!mcpdm)
@@ -492,9 +494,13 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
mcpdm->dev = &pdev->dev;
- return devm_snd_soc_register_component(&pdev->dev,
+ ret = devm_snd_soc_register_component(&pdev->dev,
&omap_mcpdm_component,
&omap_mcpdm_dai, 1);
+ if (ret)
+ return ret;
+
+ return omap_pcm_platform_register(&pdev->dev);
}
static const struct of_device_id omap_mcpdm_of_match[] = {