summaryrefslogtreecommitdiff
path: root/drivers/macintosh/macio_sysfs.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-09-04 16:27:44 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2018-10-03 15:40:01 +1000
commit0bdba867f01d69cffefee707504d3155a30f2d0f (patch)
treebfd6502331c988203608a0e7fab79b4b7687e372 /drivers/macintosh/macio_sysfs.c
parentc417596d2409125b1814c05e994a21ef9282b894 (diff)
downloadlwn-0bdba867f01d69cffefee707504d3155a30f2d0f.tar.gz
lwn-0bdba867f01d69cffefee707504d3155a30f2d0f.zip
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>
Diffstat (limited to 'drivers/macintosh/macio_sysfs.c')
-rw-r--r--drivers/macintosh/macio_sysfs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c
index ca4fcffe454b..d2451e58acb9 100644
--- a/drivers/macintosh/macio_sysfs.c
+++ b/drivers/macintosh/macio_sysfs.c
@@ -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[] = {