If dtb is provided of will create the needed devices dynamically so there
is no need to create the platform device for McPDM here.

Signed-off-by: Peter Ujfalusi <[email protected]>
---
 arch/arm/mach-omap2/devices.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index d7ca473..469f875 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -323,6 +323,10 @@ static void omap_init_mcpdm(void)
        struct omap_hwmod *oh;
        struct platform_device *pdev;
 
+       /* If dtb is there, the devices will be created dynamically */
+       if (of_have_populated_dt())
+               return;
+
        oh = omap_hwmod_lookup("mcpdm");
        if (!oh) {
                printk(KERN_ERR "Could not look up mcpdm hw_mod\n");
-- 
1.7.8.rc4

_______________________________________________
devicetree-discuss mailing list
[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss

Reply via email to