mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user