Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Peter Ujfalusi and committed by
Vinod Koul
ed64610f 04d537d9

+2 -1
+2 -1
drivers/dma/edma.c
··· 23 23 #include <linux/platform_device.h> 24 24 #include <linux/slab.h> 25 25 #include <linux/spinlock.h> 26 + #include <linux/of.h> 26 27 27 28 #include <linux/platform_data/edma.h> 28 29 ··· 1133 1132 } 1134 1133 } 1135 1134 1136 - if (EDMA_CTLRS == 2) { 1135 + if (!of_have_populated_dt() && EDMA_CTLRS == 2) { 1137 1136 pdev1 = platform_device_register_full(&edma_dev_info1); 1138 1137 if (IS_ERR(pdev1)) { 1139 1138 platform_driver_unregister(&edma_driver);