[PATCH 1/6] of: Use full node name in resource structures

Grant Likely grant.likely at secretlab.ca
Wed Jun 9 00:26:18 EST 2010


Resource names appear in human readable output, so when extracting IRQ
and address resources from a device tree node, use the full node name
to give proper context in places like /proc/iomem.

Signed-off-by: Grant Likely <grant.likely at secretlab.ca>
CC: Michal Simek <monstr at monstr.eu>
CC: Stephen Rothwell <sfr at canb.auug.org.au>
CC: Benjamin Herrenschmidt <benh at kernel.crashing.org>
CC: microblaze-uclinux at itee.uq.edu.au
CC: linuxppc-dev at ozlabs.org
---
 drivers/of/address.c |    2 +-
 drivers/of/irq.c     |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/of/address.c b/drivers/of/address.c
index 5c220c3..fcadb72 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -549,7 +549,7 @@ static int __of_address_to_resource(struct device_node *dev, const u32 *addrp,
 		r->end = taddr + size - 1;
 	}
 	r->flags = flags;
-	r->name = dev->name;
+	r->name = dev->full_name;
 	return 0;
 }
 
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 5c097be..8e8cdce 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -330,6 +330,7 @@ unsigned int of_irq_to_resource(struct device_node *dev, int index,
 	if (r && irq != NO_IRQ) {
 		r->start = r->end = irq;
 		r->flags = IORESOURCE_IRQ;
+		r->name = dev->full_name;
 	}
 
 	return irq;



More information about the Linuxppc-dev mailing list