From 77cbaf8837fd096b876d8a6c05d90683f5f4b82e Mon Sep 17 00:00:00 2001 From: Kishon Vijay Abraham I Date: Wed, 21 Jul 2021 21:28:30 +0530 Subject: dm: core: Add helper to compare node names Add helper to compare node names. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lokesh Vutla Reviewed-by: Simon Glass Link: https://lore.kernel.org/r/20210721155849.20994-2-kishon@ti.com --- include/dm/ofnode.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/dm/ofnode.h') diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index 3da05d8b217..4e1a8447e65 100644 --- a/include/dm/ofnode.h +++ b/include/dm/ofnode.h @@ -231,6 +231,16 @@ static inline ofnode ofnode_root(void) return node; } +/** + * 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 * -- cgit v1.2.3