diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2021-07-21 21:28:30 +0530 |
---|---|---|
committer | Lokesh Vutla <lokeshvutla@ti.com> | 2021-07-27 10:56:53 +0530 |
commit | 77cbaf8837fd096b876d8a6c05d90683f5f4b82e (patch) | |
tree | 8e62212071b03f04e6976d1a58c3e48aae125c9b /include | |
parent | e8ad4cb01c3f60f54920e1c894030914e9d0730b (diff) | |
download | u-boot-77cbaf8837fd096b876d8a6c05d90683f5f4b82e.zip u-boot-77cbaf8837fd096b876d8a6c05d90683f5f4b82e.tar.gz u-boot-77cbaf8837fd096b876d8a6c05d90683f5f4b82e.tar.bz2 |
dm: core: Add helper to compare node names
Add helper to compare node names.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20210721155849.20994-2-kishon@ti.com
Diffstat (limited to 'include')
-rw-r--r-- | include/dm/ofnode.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index 3da05d8..4e1a844 100644 --- a/include/dm/ofnode.h +++ b/include/dm/ofnode.h @@ -232,6 +232,16 @@ static inline ofnode ofnode_root(void) } /** + * ofnode_name_eq() - Check if the node name is equivalent to a given name + * ignoring the unit address + * + * @node: valid node reference that has to be compared + * @name: name that has to be compared with the node name + * @return true if matches, false if it doesn't match + */ +bool ofnode_name_eq(ofnode node, const char *name); + +/** * ofnode_read_u32() - Read a 32-bit integer from a property * * @ref: valid node reference to read property from |