macintosh: 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.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Rob Herring
2018-09-04 16:27:44 -05:00
committed by Michael Ellerman
parent c417596d24
commit 0bdba867f0
3 changed files with 14 additions and 6 deletions

View File

@@ -58,7 +58,13 @@ static ssize_t devspec_show(struct device *dev,
static DEVICE_ATTR_RO(modalias);
static DEVICE_ATTR_RO(devspec);
macio_config_of_attr (name, "%s\n");
static ssize_t name_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
return sprintf(buf, "%pOFn\n", dev->of_node);
}
static DEVICE_ATTR_RO(name);
macio_config_of_attr (type, "%s\n");
static struct attribute *macio_dev_attrs[] = {