dmaengine: edma: Do not register second device when booted with DT
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 31 Jul 2014 10:12:38 +0000 (13:12 +0300)
committerVinod Koul <vinod.koul@intel.com>
Thu, 31 Jul 2014 11:57:47 +0000 (17:27 +0530)
DT boot does not yet support more than one edma device. To avoid issues at
runtime we should not register the second device when the kernel is booted
with DT.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/edma.c

index 4190976ababcc51d9633e18ae150cf17e198210a..a13f37f719ed8e6acdac25fb193c04480e166c51 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
+#include <linux/of.h>
 
 #include <linux/platform_data/edma.h>
 
@@ -1132,7 +1133,7 @@ static int edma_init(void)
                }
        }
 
-       if (EDMA_CTLRS == 2) {
+       if (!of_have_populated_dt() && EDMA_CTLRS == 2) {
                pdev1 = platform_device_register_full(&edma_dev_info1);
                if (IS_ERR(pdev1)) {
                        platform_driver_unregister(&edma_driver);
This page took 0.028178 seconds and 5 git commands to generate.