[PATCH master 1/2] dma: fix fixup warning for SoCs without /soc node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For SoCs without a /soc node, any DMA coherency fixups happen at the
device tree root. The root's full name is an empty string in barebox, so
this expectedly fails.

Handle this case specially.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 drivers/dma/of_fixups.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/of_fixups.c b/drivers/dma/of_fixups.c
index 084ab94cc71c..7377c508cfda 100644
--- a/drivers/dma/of_fixups.c
+++ b/drivers/dma/of_fixups.c
@@ -16,7 +16,8 @@ static int of_dma_coherent_fixup(struct device_node *root, void *data)
 	else
 		coherency = DEV_DMA_COHERENCE_DEFAULT;
 
-	soc_kernel = of_find_node_by_path_from(root, soc_bb->full_name);
+	soc_kernel = of_find_node_by_path_from(root,
+		       *soc_bb->full_name ? soc_bb->full_name : "/");
 	if (!soc_kernel)
 		return -ENOENT;
 
-- 
2.39.5





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux