[alsa-devel] [PATCH 03/18] ASoC: omap-mcpdm: Bind the platform driver to the dai driver when loading
Peter Ujfalusi
peter.ujfalusi at ti.com
Wed Apr 16 11:23:16 CEST 2014
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 at ti.com>
---
sound/soc/omap/omap-mcpdm.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index 489cb1f972a6..f008eec9dd4b 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 */
@@ -461,6 +462,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)
@@ -491,9 +493,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[] = {
--
1.9.2
More information about the Alsa-devel
mailing list