of: Use full node name in resource structures
authorGrant Likely <grant.likely@secretlab.ca>
Tue, 8 Jun 2010 13:48:12 +0000 (07:48 -0600)
committerGrant Likely <grant.likely@secretlab.ca>
Mon, 5 Jul 2010 22:14:27 +0000 (16:14 -0600)
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@secretlab.ca>
CC: Michal Simek <monstr@monstr.eu>
CC: Stephen Rothwell <sfr@canb.auug.org.au>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: microblaze-uclinux@itee.uq.edu.au
CC: linuxppc-dev@ozlabs.org
drivers/of/address.c
drivers/of/irq.c

index 5c220c3a3acc90a7d191c7b84ebc53ee24485df7..fcadb726d4f9cdbed41ecf370544b358644a65b5 100644 (file)
@@ -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;
 }
 
index 623eb661c629fd631431acd2fc3715827dfa2b58..6cfb307204c3930f1a65d4579267ef324decd0e0 100644 (file)
@@ -340,6 +340,7 @@ int of_irq_to_resource(struct device_node *dev, int index, struct resource *r)
        if (r && irq != NO_IRQ) {
                r->start = r->end = irq;
                r->flags = IORESOURCE_IRQ;
+               r->name = dev->full_name;
        }
 
        return irq;