aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2014-07-31 06:12:38 -0400
committerVinod Koul <vinod.koul@intel.com>2014-07-31 07:57:47 -0400
commited64610f29414c0ea782bb6a462a3be72e7704dd (patch)
treec60b242a71c23bd2b6d2c28492026637646a5f2c
parent04d537d95e2f48295b6f61ef7029a2dba75e3677 (diff)
dmaengine: edma: Do not register second device when booted with DT
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>
-rw-r--r--drivers/dma/edma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 4190976ababc..a13f37f719ed 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -23,6 +23,7 @@
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/slab.h> 24#include <linux/slab.h>
25#include <linux/spinlock.h> 25#include <linux/spinlock.h>
26#include <linux/of.h>
26 27
27#include <linux/platform_data/edma.h> 28#include <linux/platform_data/edma.h>
28 29
@@ -1132,7 +1133,7 @@ static int edma_init(void)
1132 } 1133 }
1133 } 1134 }
1134 1135
1135 if (EDMA_CTLRS == 2) { 1136 if (!of_have_populated_dt() && EDMA_CTLRS == 2) {
1136 pdev1 = platform_device_register_full(&edma_dev_info1); 1137 pdev1 = platform_device_register_full(&edma_dev_info1);
1137 if (IS_ERR(pdev1)) { 1138 if (IS_ERR(pdev1)) {
1138 platform_driver_unregister(&edma_driver); 1139 platform_driver_unregister(&edma_driver);