* 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. */
| 1411 | * @param name The name of the property to delete. |
| 1412 | */ |
| 1413 | void 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. |
no test coverage detected