summaryrefslogtreecommitdiff
path: root/include/linux/property.h
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2023-11-06 10:31:41 +0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2023-12-04 12:37:46 +0300
commita9c8c738066b7ba9e208cfc3200a6f60593982b4 (patch)
treeccbaee1d325fd618998bd5ab2fef71dde207de95 /include/linux/property.h
parent03cc7fefbb09dd70f3b21d127784879fac0bbf00 (diff)
downloadlinux-a9c8c738066b7ba9e208cfc3200a6f60593982b4.tar.xz
device property: Add fwnode_name_eq()
Add fwnode_name_eq() to implement the functionality of of_node_name_eq() on fwnode property API. The same convention of ending the comparison at '@' (besides NUL) is applied on also both ACPI and swnode. The function is intended for comparing unit address-less node names on DT and firmware or swnodes compliant with DT bindings. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Rafael J. Wysocki <rafael@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'include/linux/property.h')
-rw-r--r--include/linux/property.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/property.h b/include/linux/property.h
index 9f2585d705a8..4ebbb169df20 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -109,6 +109,7 @@ struct fwnode_handle *fwnode_find_reference(const struct fwnode_handle *fwnode,
const char *fwnode_get_name(const struct fwnode_handle *fwnode);
const char *fwnode_get_name_prefix(const struct fwnode_handle *fwnode);
+bool fwnode_name_eq(const struct fwnode_handle *fwnode, const char *name);
struct fwnode_handle *fwnode_get_parent(const struct fwnode_handle *fwnode);
struct fwnode_handle *fwnode_get_next_parent(struct fwnode_handle *fwnode);