summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>2026-02-23 16:37:17 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-03-12 18:18:49 +0300
commitc86d3b7b847cc9b32a17117cfd71679e4315fd9f (patch)
treee828512b154bfcdfeeb4c670fbb97c43d85c5c02 /include
parent59621105ffca7a33955f56bc7dee0923992f5832 (diff)
downloadlinux-c86d3b7b847cc9b32a17117cfd71679e4315fd9f.tar.xz
of: provide of_machine_read_model()
Provide a helper function allowing users to read the model string of the machine, hiding the access to the root node. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20260223-soc-of-root-v2-2-b45da45903c8@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/of.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index 7df971d52b55..2b95777f16f6 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -427,6 +427,7 @@ static inline bool of_machine_is_compatible(const char *compat)
}
int of_machine_read_compatible(const char **compatible, unsigned int index);
+int of_machine_read_model(const char **model);
extern int of_add_property(struct device_node *np, struct property *prop);
extern int of_remove_property(struct device_node *np, struct property *prop);
@@ -859,6 +860,11 @@ static inline int of_machine_read_compatible(const char **compatible,
return -ENOSYS;
}
+static inline int of_machine_read_model(const char **model)
+{
+ return -ENOSYS;
+}
+
static inline int of_add_property(struct device_node *np, struct property *prop)
{
return 0;