aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2014-04-16 08:46:14 -0400
committerMark Brown <broonie@linaro.org>2014-04-18 13:00:35 -0400
commit335b06515eda252b36aa9063596f740a903c1e35 (patch)
treec6dc0c5a4e8a93a69d7ec525b35fc70c733e9e0b
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>
-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 @@
42#include <sound/dmaengine_pcm.h> 42#include <sound/dmaengine_pcm.h>
43 43
44#include "omap-mcpdm.h" 44#include "omap-mcpdm.h"
45#include "omap-pcm.h"
45 46
46struct mcpdm_link_config { 47struct mcpdm_link_config {
47 u32 link_mask; /* channel mask for the direction */ 48 u32 link_mask; /* channel mask for the direction */
@@ -462,6 +463,7 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
462{ 463{
463 struct omap_mcpdm *mcpdm; 464 struct omap_mcpdm *mcpdm;
464 struct resource *res; 465 struct resource *res;
466 int ret;
465 467
466 mcpdm = devm_kzalloc(&pdev->dev, sizeof(struct omap_mcpdm), GFP_KERNEL); 468 mcpdm = devm_kzalloc(&pdev->dev, sizeof(struct omap_mcpdm), GFP_KERNEL);
467 if (!mcpdm) 469 if (!mcpdm)
@@ -492,9 +494,13 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
492 494
493 mcpdm->dev = &pdev->dev; 495 mcpdm->dev = &pdev->dev;
494 496
495 return devm_snd_soc_register_component(&pdev->dev, 497 ret = devm_snd_soc_register_component(&pdev->dev,
496 &omap_mcpdm_component, 498 &omap_mcpdm_component,
497 &omap_mcpdm_dai, 1); 499 &omap_mcpdm_dai, 1);
500 if (ret)
501 return ret;
502
503 return omap_pcm_platform_register(&pdev->dev);
498} 504}
499 505
500static const struct of_device_id omap_mcpdm_of_match[] = { 506static const struct of_device_id omap_mcpdm_of_match[] = {