Skip to contentSkip to conversation

mtd: Convert to using %pOFn instead of device_node.name

PATCH Superseded Rob Herring 1 participant 1 message Aug 29, 2018

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: Convert to using %pOFn instead of device_node.name

In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.

Cc David Woodhouse <[email protected]>
Cc Brian Norris <[email protected]>
Cc Boris Brezillon <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>

---
One more %pOFn conversion for MTD. Please apply to MTD tree.

 drivers/mtd/devices/powernv_flash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/devices/powernv_flash.c +1 -1
index 33593122e49b..22f753e555ac 100644
@@ -212,7 +212,7 @@ static int powernv_flash_set_driver_info(struct device *dev,
 	 * Going to have to check what details I need to set and how to
 	 * get them
 	 */
-	mtd->name = of_get_property(dev->of_node, "name", NULL);
+	mtd->name = devm_kasprintf(dev, GFP_KERNEL, "%pOFn", dev->of_node);
 	mtd->type = MTD_NORFLASH;
 	mtd->flags = MTD_WRITEABLE;
 	mtd->size = size;
Signature · 1 line
2.17.1