Skip to contentSkip to conversation

sparc: Use DT node full_name instead of name for resources

PATCH New Rob Herring 1 participant 1 message Nov 16, 2018 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH v2 10/10 sparc: Use DT node full_name instead of name for resources

The device_node.name pointer is going to be removed. As the device_node.full_name is now just the name+unit-address instead of the full path, use the full_name pointer instead. This will add the unit-address if there is one to the resource name.

---
 arch/sparc/kernel/ioport.c       | 2 +-
 arch/sparc/kernel/of_device_32.c | 2 +-
 arch/sparc/kernel/of_device_64.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/sparc/kernel/ioport.c +1 -1
index 6799c93c9f27..aeaad04fdd14 100644
@@ -302,7 +302,7 @@ static void *sbus_alloc_coherent(struct device *dev, size_t len,
 	if (sbus_map_dma_area(dev, dma_addrp, va, res->start, len_total) != 0)
 		goto err_noiommu;
 
-	res->name = op->dev.of_node->name;
+	res->name = op->dev.of_node->full_name;
 
 	return (void *)(unsigned long)res->start;
 
arch/sparc/kernel/of_device_32.c +1 -1
index ee4841a96058..4ebf51e6e78e 100644
@@ -333,7 +333,7 @@ static void __init build_device_resources(struct platform_device *op,
 			r->end = result + size - 1;
 			r->flags = flags | ((result >> 32ULL) & 0xffUL);
 		}
-		r->name = op->dev.of_node->name;
+		r->name = op->dev.of_node->full_name;
 	}
 }
 
arch/sparc/kernel/of_device_64.c +1 -1
index 4b5eabb20ac8..5a9f86b1d4e7 100644
@@ -413,7 +413,7 @@ static void __init build_device_resources(struct platform_device *op,
 			r->end = result + size - 1;
 			r->flags = flags;
 		}
-		r->name = op->dev.of_node->name;
+		r->name = op->dev.of_node->full_name;
 	}
 }
 
Signature · 1 line
2.19.1