MCPcopy Create free account
hub / github.com/coreboot/coreboot / dt_delete_prop

Function dt_delete_prop

src/commonlib/device_tree.c:1413–1423  ·  view source on GitHub ↗

* Delete a property by name in a given node if it exists. * * @param node The device tree node to operate on. * @param name The name of the property to delete. */

Source from the content-addressed store, hash-verified

1411 * @param name The name of the property to delete.
1412 */
1413void dt_delete_prop(struct device_tree_node *node, const char *name)
1414{
1415 struct device_tree_property *prop;
1416
1417 list_for_each(prop, node->properties, list_node) {
1418 if (!strcmp(prop->prop.name, name)) {
1419 list_remove(&prop->list_node);
1420 return;
1421 }
1422 }
1423}
1424
1425/*
1426 * Add an arbitrary property to a node, or update it if it already exists.

Callers 1

dt_platform_fixup_phyFunction · 0.85

Calls 2

list_removeFunction · 0.85
strcmpFunction · 0.50

Tested by

no test coverage detected