diff options
author | Rob Herring <robh@kernel.org> | 2018-08-27 21:00:19 -0400 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2018-09-07 12:04:41 -0400 |
commit | a613b26a50136ae90ab13943afe90bcbd34adb44 (patch) | |
tree | ae73468305d84211243721b857da21990ed11a8e /drivers/of/unittest.c | |
parent | 6901378c799d2358a2e4eff9818266df73c3b216 (diff) |
of: 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.
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/unittest.c')
-rw-r--r-- | drivers/of/unittest.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 204432bf791c..35b7886e9592 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c | |||
@@ -212,8 +212,8 @@ static int __init of_unittest_check_node_linkage(struct device_node *np) | |||
212 | 212 | ||
213 | for_each_child_of_node(np, child) { | 213 | for_each_child_of_node(np, child) { |
214 | if (child->parent != np) { | 214 | if (child->parent != np) { |
215 | pr_err("Child node %s links to wrong parent %s\n", | 215 | pr_err("Child node %pOFn links to wrong parent %pOFn\n", |
216 | child->name, np->name); | 216 | child, np); |
217 | rc = -EINVAL; | 217 | rc = -EINVAL; |
218 | goto put_child; | 218 | goto put_child; |
219 | } | 219 | } |
@@ -1040,16 +1040,16 @@ static void __init of_unittest_platform_populate(void) | |||
1040 | for_each_child_of_node(np, child) { | 1040 | for_each_child_of_node(np, child) { |
1041 | for_each_child_of_node(child, grandchild) | 1041 | for_each_child_of_node(child, grandchild) |
1042 | unittest(of_find_device_by_node(grandchild), | 1042 | unittest(of_find_device_by_node(grandchild), |
1043 | "Could not create device for node '%s'\n", | 1043 | "Could not create device for node '%pOFn'\n", |
1044 | grandchild->name); | 1044 | grandchild); |
1045 | } | 1045 | } |
1046 | 1046 | ||
1047 | of_platform_depopulate(&test_bus->dev); | 1047 | of_platform_depopulate(&test_bus->dev); |
1048 | for_each_child_of_node(np, child) { | 1048 | for_each_child_of_node(np, child) { |
1049 | for_each_child_of_node(child, grandchild) | 1049 | for_each_child_of_node(child, grandchild) |
1050 | unittest(!of_find_device_by_node(grandchild), | 1050 | unittest(!of_find_device_by_node(grandchild), |
1051 | "device didn't get destroyed '%s'\n", | 1051 | "device didn't get destroyed '%pOFn'\n", |
1052 | grandchild->name); | 1052 | grandchild); |
1053 | } | 1053 | } |
1054 | 1054 | ||
1055 | platform_device_unregister(test_bus); | 1055 | platform_device_unregister(test_bus); |