dmaengine: OMAP: Register SDMA controller with Device Tree DMA driver
[linux.git] / arch / arm / mach-omap2 / dma.c
index dab9fc014b971cb7834dd518558dbb58de0996c5..49fd0d501c9bc5edcbb83bbb234891e0c381753c 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/dma-mapping.h>
+#include <linux/of.h>
 #include <linux/omap-dma.h>
 
 #include "soc.h"
@@ -304,6 +305,9 @@ static int __init omap2_system_dma_init(void)
        if (res)
                return res;
 
+       if (of_have_populated_dt())
+               return res;
+
        pdev = platform_device_register_full(&omap_dma_dev_info);
        if (IS_ERR(pdev))
                return PTR_ERR(pdev);