[PATCH 3/3] of: provide of_node_get and of_node_put stubs

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Dec 8 23:10:02 PST 2022

While removal of of_node_get and of_node_put can simplify ported kernel
code, on the other hand, they can be more of a hassle with future syncs
of the driver. Just provide stubs for them, so they can be left in.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
 include/of.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/of.h b/include/of.h
index 901101df051d..e1024e2c3ff8 100644
--- a/include/of.h
+++ b/include/of.h
@@ -101,6 +101,11 @@ static inline const void *of_property_get_value(const struct property *pp)
 	return pp->value ? pp->value : pp->value_const;
+static inline struct device_node *of_node_get(struct device_node *node)
+	return node;
+static inline void of_node_put(struct device_node *node) { }
 void of_print_property(const void *data, int len);
 void of_print_cmdline(struct device_node *root);

More information about the barebox mailing list