diff options
author | Rob Herring <robh@kernel.org> | 2017-06-01 16:50:55 -0400 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2017-07-18 18:09:18 -0400 |
commit | 0d638a07d3a1e98a7598eb2812a6236324e4c55f (patch) | |
tree | 5cca2869338b69318f5f758b0a6e8cb9ebaad69d /drivers/of/platform.c | |
parent | b4032ff9af1c266ca671682117ba73e1ba89a259 (diff) |
of: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/platform.c')
-rw-r--r-- | drivers/of/platform.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index b19524623498..683b2e74bef7 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c | |||
@@ -228,7 +228,7 @@ static struct amba_device *of_amba_device_create(struct device_node *node, | |||
228 | const void *prop; | 228 | const void *prop; |
229 | int i, ret; | 229 | int i, ret; |
230 | 230 | ||
231 | pr_debug("Creating amba device %s\n", node->full_name); | 231 | pr_debug("Creating amba device %pOF\n", node); |
232 | 232 | ||
233 | if (!of_device_is_available(node) || | 233 | if (!of_device_is_available(node) || |
234 | of_node_test_and_set_flag(node, OF_POPULATED)) | 234 | of_node_test_and_set_flag(node, OF_POPULATED)) |
@@ -259,15 +259,15 @@ static struct amba_device *of_amba_device_create(struct device_node *node, | |||
259 | 259 | ||
260 | ret = of_address_to_resource(node, 0, &dev->res); | 260 | ret = of_address_to_resource(node, 0, &dev->res); |
261 | if (ret) { | 261 | if (ret) { |
262 | pr_err("amba: of_address_to_resource() failed (%d) for %s\n", | 262 | pr_err("amba: of_address_to_resource() failed (%d) for %pOF\n", |
263 | ret, node->full_name); | 263 | ret, node); |
264 | goto err_free; | 264 | goto err_free; |
265 | } | 265 | } |
266 | 266 | ||
267 | ret = amba_device_add(dev, &iomem_resource); | 267 | ret = amba_device_add(dev, &iomem_resource); |
268 | if (ret) { | 268 | if (ret) { |
269 | pr_err("amba_device_add() failed (%d) for %s\n", | 269 | pr_err("amba_device_add() failed (%d) for %pOF\n", |
270 | ret, node->full_name); | 270 | ret, node); |
271 | goto err_free; | 271 | goto err_free; |
272 | } | 272 | } |
273 | 273 | ||
@@ -310,7 +310,7 @@ static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *l | |||
310 | if (!of_address_to_resource(np, 0, &res)) | 310 | if (!of_address_to_resource(np, 0, &res)) |
311 | if (res.start != auxdata->phys_addr) | 311 | if (res.start != auxdata->phys_addr) |
312 | continue; | 312 | continue; |
313 | pr_debug("%s: devname=%s\n", np->full_name, auxdata->name); | 313 | pr_debug("%pOF: devname=%s\n", np, auxdata->name); |
314 | return auxdata; | 314 | return auxdata; |
315 | } | 315 | } |
316 | 316 | ||
@@ -323,7 +323,7 @@ static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *l | |||
323 | if (!of_device_is_compatible(np, auxdata->compatible)) | 323 | if (!of_device_is_compatible(np, auxdata->compatible)) |
324 | continue; | 324 | continue; |
325 | if (!auxdata->phys_addr && !auxdata->name) { | 325 | if (!auxdata->phys_addr && !auxdata->name) { |
326 | pr_debug("%s: compatible match\n", np->full_name); | 326 | pr_debug("%pOF: compatible match\n", np); |
327 | return auxdata; | 327 | return auxdata; |
328 | } | 328 | } |
329 | } | 329 | } |
@@ -356,14 +356,14 @@ static int of_platform_bus_create(struct device_node *bus, | |||
356 | 356 | ||
357 | /* Make sure it has a compatible property */ | 357 | /* Make sure it has a compatible property */ |
358 | if (strict && (!of_get_property(bus, "compatible", NULL))) { | 358 | if (strict && (!of_get_property(bus, "compatible", NULL))) { |
359 | pr_debug("%s() - skipping %s, no compatible prop\n", | 359 | pr_debug("%s() - skipping %pOF, no compatible prop\n", |
360 | __func__, bus->full_name); | 360 | __func__, bus); |
361 | return 0; | 361 | return 0; |
362 | } | 362 | } |
363 | 363 | ||
364 | if (of_node_check_flag(bus, OF_POPULATED_BUS)) { | 364 | if (of_node_check_flag(bus, OF_POPULATED_BUS)) { |
365 | pr_debug("%s() - skipping %s, already populated\n", | 365 | pr_debug("%s() - skipping %pOF, already populated\n", |
366 | __func__, bus->full_name); | 366 | __func__, bus); |
367 | return 0; | 367 | return 0; |
368 | } | 368 | } |
369 | 369 | ||
@@ -387,7 +387,7 @@ static int of_platform_bus_create(struct device_node *bus, | |||
387 | return 0; | 387 | return 0; |
388 | 388 | ||
389 | for_each_child_of_node(bus, child) { | 389 | for_each_child_of_node(bus, child) { |
390 | pr_debug(" create child: %s\n", child->full_name); | 390 | pr_debug(" create child: %pOF\n", child); |
391 | rc = of_platform_bus_create(child, matches, lookup, &dev->dev, strict); | 391 | rc = of_platform_bus_create(child, matches, lookup, &dev->dev, strict); |
392 | if (rc) { | 392 | if (rc) { |
393 | of_node_put(child); | 393 | of_node_put(child); |
@@ -419,7 +419,7 @@ int of_platform_bus_probe(struct device_node *root, | |||
419 | return -EINVAL; | 419 | return -EINVAL; |
420 | 420 | ||
421 | pr_debug("%s()\n", __func__); | 421 | pr_debug("%s()\n", __func__); |
422 | pr_debug(" starting at: %s\n", root->full_name); | 422 | pr_debug(" starting at: %pOF\n", root); |
423 | 423 | ||
424 | /* Do a self check of bus type, if there's a match, create children */ | 424 | /* Do a self check of bus type, if there's a match, create children */ |
425 | if (of_match_node(matches, root)) { | 425 | if (of_match_node(matches, root)) { |
@@ -471,7 +471,7 @@ int of_platform_populate(struct device_node *root, | |||
471 | return -EINVAL; | 471 | return -EINVAL; |
472 | 472 | ||
473 | pr_debug("%s()\n", __func__); | 473 | pr_debug("%s()\n", __func__); |
474 | pr_debug(" starting at: %s\n", root->full_name); | 474 | pr_debug(" starting at: %pOF\n", root); |
475 | 475 | ||
476 | for_each_child_of_node(root, child) { | 476 | for_each_child_of_node(root, child) { |
477 | rc = of_platform_bus_create(child, matches, lookup, parent, true); | 477 | rc = of_platform_bus_create(child, matches, lookup, parent, true); |
@@ -660,8 +660,8 @@ static int of_platform_notify(struct notifier_block *nb, | |||
660 | of_dev_put(pdev_parent); | 660 | of_dev_put(pdev_parent); |
661 | 661 | ||
662 | if (pdev == NULL) { | 662 | if (pdev == NULL) { |
663 | pr_err("%s: failed to create for '%s'\n", | 663 | pr_err("%s: failed to create for '%pOF'\n", |
664 | __func__, rd->dn->full_name); | 664 | __func__, rd->dn); |
665 | /* of_platform_device_create tosses the error code */ | 665 | /* of_platform_device_create tosses the error code */ |
666 | return notifier_from_errno(-EINVAL); | 666 | return notifier_from_errno(-EINVAL); |
667 | } | 667 | } |