diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2010-03-30 10:19:26 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2010-04-07 00:08:18 -0500 |
commit | 49b97d9c8ea7b11c4fc9e457cc2cd9fd6ebf0c21 (patch) | |
tree | a3e156a630856f486df59b9cb6fd062dee8c9687 /common/fdt_support.c | |
parent | 69bcf5bc80a47acbd62b8cfff932cb12d47997d7 (diff) | |
download | u-boot-imx-49b97d9c8ea7b11c4fc9e457cc2cd9fd6ebf0c21.zip u-boot-imx-49b97d9c8ea7b11c4fc9e457cc2cd9fd6ebf0c21.tar.gz u-boot-imx-49b97d9c8ea7b11c4fc9e457cc2cd9fd6ebf0c21.tar.bz2 |
fdt: Add fdt_del_node_and_alias helper
Add a helper function that given an alias will delete both the node
the alias points to and the alias itself
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
Diffstat (limited to 'common/fdt_support.c')
-rw-r--r-- | common/fdt_support.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/fdt_support.c b/common/fdt_support.c index b7d4fe5..b6f252a 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -976,3 +976,16 @@ void fdt_fixup_mtdparts(void *blob, void *node_info, int node_info_size) } } #endif + +void fdt_del_node_and_alias(void *blob, const char *alias) +{ + int off = fdt_path_offset(blob, alias); + + if (off < 0) + return; + + fdt_del_node(blob, off); + + off = fdt_path_offset(blob, "/aliases"); + fdt_delprop(blob, off, alias); +} |