diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-30 11:32:01 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-30 11:32:01 -0700 |
commit | f64d6e2aaa79f0ad588fd7ad595a0a8eb8f04645 (patch) | |
tree | 3ee28acc12e4f58320bfabd146d86755be6236fd /drivers/of/overlay.c | |
parent | 1056c9bd2702ea1bb79abf9bd1e78c578589d247 (diff) | |
parent | 099c0cbd2025192f098e6da7f3c8118f6833dfe9 (diff) | |
download | linux-f64d6e2aaa79f0ad588fd7ad595a0a8eb8f04645.tar.gz linux-f64d6e2aaa79f0ad588fd7ad595a0a8eb8f04645.tar.bz2 linux-f64d6e2aaa79f0ad588fd7ad595a0a8eb8f04645.zip |
Merge tag 'devicetree-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull DeviceTree updates from Rob Herring:
- remove most of_platform_populate() calls in arch code. Now the DT
core code calls it in the default case and platforms only need to
call it if they have special needs
- use pr_fmt on all the DT core print statements
- CoreSight binding doc improvements to block name descriptions
- add dt_to_config script which can parse dts files and list
corresponding kernel config options
- fix memory leak hit with a PowerMac DT
- correct a bunch of STMicro compatible strings to use the correct
vendor prefix
- fix DA9052 PMIC binding doc to match what is actually used in dts
files
* tag 'devicetree-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (35 commits)
documentation: da9052: Update regulator bindings names to match DA9052/53 DTS expectations
xtensa: Partially Revert "xtensa: Remove unnecessary of_platform_populate with default match table"
xtensa: Fix build error due to missing include file
MIPS: ath79: Add missing include file
Fix spelling errors in Documentation/devicetree
ARM: dts: fix STMicroelectronics compatible strings
powerpc/dts: fix STMicroelectronics compatible strings
Documentation: dt: i2c: use correct STMicroelectronics vendor prefix
scripts/dtc: dt_to_config - kernel config options for a devicetree
of: fdt: mark unflattened tree as detached
of: overlay: add resolver error prints
coresight: document binding acronyms
Documentation/devicetree: document cavium-pip rx-delay/tx-delay properties
of: use pr_fmt prefix for all console printing
of/irq: Mark initialised interrupt controllers as populated
of: fix memory leak related to safe_name()
Revert "of/platform: export of_default_bus_match_table"
of: unittest: use of_platform_default_populate() to populate default bus
memory: omap-gpmc: use of_platform_default_populate() to populate default bus
bus: uniphier-system-bus: use of_platform_default_populate() to populate default bus
...
Diffstat (limited to 'drivers/of/overlay.c')
-rw-r--r-- | drivers/of/overlay.c | 43 |
1 files changed, 16 insertions, 27 deletions
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 82250815e9a5..318dbb51e7a2 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -8,7 +8,9 @@ * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. */ -#undef DEBUG + +#define pr_fmt(fmt) "OF: overlay: " fmt + #include <linux/kernel.h> #include <linux/module.h> #include <linux/of.h> @@ -137,8 +139,8 @@ static int of_overlay_apply_one(struct of_overlay *ov, for_each_property_of_node(overlay, prop) { ret = of_overlay_apply_single_property(ov, target, prop); if (ret) { - pr_err("%s: Failed to apply prop @%s/%s\n", - __func__, target->full_name, prop->name); + pr_err("Failed to apply prop @%s/%s\n", + target->full_name, prop->name); return ret; } } @@ -146,9 +148,8 @@ static int of_overlay_apply_one(struct of_overlay *ov, for_each_child_of_node(overlay, child) { ret = of_overlay_apply_single_device_node(ov, target, child); if (ret != 0) { - pr_err("%s: Failed to apply single node @%s/%s\n", - __func__, target->full_name, - child->name); + pr_err("Failed to apply single node @%s/%s\n", + target->full_name, child->name); of_node_put(child); return ret; } @@ -176,8 +177,7 @@ static int of_overlay_apply(struct of_overlay *ov) err = of_overlay_apply_one(ov, ovinfo->target, ovinfo->overlay); if (err != 0) { - pr_err("%s: overlay failed '%s'\n", - __func__, ovinfo->target->full_name); + pr_err("apply failed '%s'\n", ovinfo->target->full_name); return err; } } @@ -208,7 +208,7 @@ static struct device_node *find_target_node(struct device_node *info_node) if (ret == 0) return of_find_node_by_path(path); - pr_err("%s: Failed to find target for node %p (%s)\n", __func__, + pr_err("Failed to find target for node %p (%s)\n", info_node, info_node->name); return NULL; @@ -355,8 +355,6 @@ int of_overlay_create(struct device_node *tree) id = idr_alloc(&ov_idr, ov, 0, 0, GFP_KERNEL); if (id < 0) { - pr_err("%s: idr_alloc() failed for tree@%s\n", - __func__, tree->full_name); err = id; goto err_destroy_trans; } @@ -365,26 +363,21 @@ int of_overlay_create(struct device_node *tree) /* build the overlay info structures */ err = of_build_overlay_info(ov, tree); if (err) { - pr_err("%s: of_build_overlay_info() failed for tree@%s\n", - __func__, tree->full_name); + pr_err("of_build_overlay_info() failed for tree@%s\n", + tree->full_name); goto err_free_idr; } /* apply the overlay */ err = of_overlay_apply(ov); - if (err) { - pr_err("%s: of_overlay_apply() failed for tree@%s\n", - __func__, tree->full_name); + if (err) goto err_abort_trans; - } /* apply the changeset */ err = __of_changeset_apply(&ov->cset); - if (err) { - pr_err("%s: __of_changeset_apply() failed for tree@%s\n", - __func__, tree->full_name); + if (err) goto err_revert_overlay; - } + /* add to the tail of the overlay list */ list_add_tail(&ov->node, &ov_list); @@ -469,8 +462,7 @@ static int overlay_removal_is_ok(struct of_overlay *ov) list_for_each_entry(ce, &ov->cset.entries, node) { if (!overlay_is_topmost(ov, ce->np)) { - pr_err("%s: overlay #%d is not topmost\n", - __func__, ov->id); + pr_err("overlay #%d is not topmost\n", ov->id); return 0; } } @@ -496,16 +488,13 @@ int of_overlay_destroy(int id) ov = idr_find(&ov_idr, id); if (ov == NULL) { err = -ENODEV; - pr_err("%s: Could not find overlay #%d\n", - __func__, id); + pr_err("destroy: Could not find overlay #%d\n", id); goto out; } /* check whether the overlay is safe to remove */ if (!overlay_removal_is_ok(ov)) { err = -EBUSY; - pr_err("%s: removal check failed for overlay #%d\n", - __func__, id); goto out; } |